> For the complete documentation index, see [llms.txt](https://docs.halosecurity.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.halosecurity.com/docs/integrations/discovery-integrations/cloudflare.md).

# Cloudflare

Connect your Cloudflare account with Halo Security to automatically import targets into your account and discover origin IPs of assets behind the CDN.

## Create an API token

{% hint style="info" %}
The custom API token only gives Halo Security the necessary permissions to read DNS zones and records associated with your account.
{% endhint %}

1. Sign in to your Cloudflare account, and access the [API tokens](https://dash.cloudflare.com/profile/api-tokens) page.
2. Select **Create Token,** then choose to create a custom token.
3. Give the new token a name, like Halo Security Integration.
4. For **Permissions**, select: ***Zone → DNS → Read***
5. Continue to Summary, then select Create Token.
6. Copy the API token to your clipboard.

## Setup the integration

1. Visit your *Settings → Integrations →* [Add](https://app.halosecurity.com/user/settings/integrations/add).
2. Add the Cloudflare integration.
3. Add a name for your integration.
4. Enter your API token into the form and select Save Changes.

## Using the integration

Now that your account is integrated with Cloudflare, you may run the integration. After it has been run, new **Zones** and **Records** will populate. Viewing either of these pages will allow you to add individual zones (domain names) and records (subdomain names and IP addresses).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.halosecurity.com/docs/integrations/discovery-integrations/cloudflare.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
