# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
