---
title: "Create an API Token at Cloudflare – step by step – Wi24rd Huginn and Muninn · Wi24rd"
description: "Read this when you want to see step by step, with screenshots, what to do in Cloudflare's dashboard."
url: "https://wi24rd.com/en/documentation/huginn-muninn/cloudflare/"
lang: "en"
alternates:
  da: "https://wi24rd.com/dokumentation/huginn-muninn/cloudflare/"
  en: "https://wi24rd.com/en/documentation/huginn-muninn/cloudflare/"
---

Documentation / Wi24rd Huginn and Muninn

# Create an API Token at Cloudflare – step by step

Read this when you want to see step by step, with screenshots, what to do in Cloudflare's dashboard.

Version 1.1.0 · updated 19 November 2026 · matches the source code at commit `b8ace52`

This chapter shows with screenshots how to create the API Token the program needs. The pictures are from Cloudflare's dashboard in November 2026 on an account with three example domains (`wi24rd.com`, `abe.wi24rd.com` and `xyz.wi24rd.com`). Cloudflare changes its dashboard now and then, so the buttons may have moved a little, but the fields are the same.

**What you should end up with:** an API Token named _Huginn and Muninn_, the two required permissions (**Zone › Read** and **Analytics › Read**), if you like the optional **Account Security Center Insights › Read** (see step 2), and access to the domains Huginn should see. Nothing else.

## Step 1 – Open Cloudflare's page with the fields filled in

Click **Create API Token at Cloudflare** in the program (in step 2 of the guide or under **Settings** › **Connection**). It opens Cloudflare's page **My Profile › API Tokens** in your browser with the name and the two permissions filled in. If you are not logged in at Cloudflare, log in first; the page opens afterwards.

[!\[Create Token with name and policy filled in\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-01-create-token.webp?v=e1c50f03)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-01-create-token.webp?v=e1c50f03)

_The **Create Token** page. The name is under **Token name**, and under **Policies** there is one zone policy with **Include · All zones**. The numbers on the right show that 1 permission is chosen under DNS & Zones and 1 under Analytics & Logs._

If you start from the **Create Token** button on the **API Tokens** page yourself instead, you fill in the name and permissions by hand. The fields are the same as in the pictures.

## Step 2 – Check the two permissions

Unfold **DNS & Zones**. Here **Zone** must be ticked under **Read** and nothing else.

[!\[DNS & Zones with Zone › Read chosen\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-02-zone-read.webp?v=679d648f)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-02-zone-read.webp?v=679d648f)

_Under **DNS & Zones** only **Zone › Read** is chosen. That lets the program see which domains the account has, and nothing more._

Unfold **Analytics & Logs**. Here **Analytics** must be ticked under **Read**.

[!\[Analytics & Logs with Analytics › Read chosen\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-03-analytics-read.webp?v=6cb8e799)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-03-analytics-read.webp?v=6cb8e799)

_Under **Analytics & Logs** only **Analytics › Read** is chosen. That lets the program read the figures._

All other groups must stay at **0** (except the optional permission below, if you want it). Never give **Edit** to anything: the program only reads, and an API Token without write permissions cannot change anything at Cloudflare, whatever happens to your computer.

### Optional: Cloudflare's own findings

If you want to see Cloudflare's own security findings (Security Insights) under Attacks, give the token one more permission: **Account Security Center Insights › Read**. It belongs to the account, not to the domains, so it goes in a new policy for the account. It can only read. Without it the program works as before, and the section **Cloudflare's own findings** says the permission can be added.

1. Click **Add new policy** below the policy with the two permissions, and choose **Add new Account policy**.

[!\[Add new policy with the choice Add new Account policy\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-13-add-account-policy.webp?v=ea1538a9)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-13-add-account-policy.webp?v=ea1538a9)

_The menu under **Add new policy**: choose **Add new Account policy**, not **Add new Zone policy**._

1. Leave **Include** and **All accounts** as they are. Type `Security Center` in the search field, and tick **Read** next to **Account Security Center Insights**.

[!\[Account Security Center Insights with Read selected\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-14-account-insights-read.webp?v=0947f23e)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-14-account-insights-read.webp?v=0947f23e)

_The new account policy with **Account Security Center Insights › Read**. The first policy is folded above it with **Analytics Read, Zone Read**._

If you search for `Security Center` in the first policy, you find **Zone Security Center Insights**. It does not work with the program: Cloudflare only answers with the account's findings. Use **Account Security Center Insights**.

## Step 3 – Choose which domains the API Token may see

At the top of the policy are **Include** and **All zones**. Click **All zones** to see the choices.

[!\[The choices under zone resources\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-04-zone-resources.webp?v=12a8e3c9)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-04-zone-resources.webp?v=12a8e3c9)

_Three choices: **All zones** (all domains on all your accounts), **All zones from an account** (all domains on one account) and **Specific zone** (one particular domain)._

- If Huginn should be able to see **all** your domains, leave **All zones**. You still choose in the program which of them are fetched.
- If the API Token should only see **one** domain, for example because you are making it for a customer, choose **Specific zone** and then the domain in the list that appears.

[!\[The list of domains under Specific zone\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-05-specific-zone-list.webp?v=47998778)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-05-specific-zone-list.webp?v=47998778)

_With **Specific zone** chosen, a third field appears with the account's domains._

[!\[abe.wi24rd.com chosen as the specific zone\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-06-specific-zone-chosen.webp?v=78d46416)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-06-specific-zone-chosen.webp?v=78d46416)

_Here `abe.wi24rd.com` is chosen. A program with this API Token sees only that domain._

If you want to give access to several particular domains, click **Add more** and add one line per domain.

## Step 4 – Expiration and IP filter

Scroll down. **Token expiration** is at **No expiration**. If you choose an expiry, the program stops fetching on that day, and you have to create a new API Token. Leave **Client IP address filtering** empty; your computer's address changes, and a filter would lock the program out.

[!\[Token expiration, IP filter and Continue to summary\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-07-expiration-continue.webp?v=0e274a65)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-07-expiration-continue.webp?v=0e274a65)

_At the bottom of the page: expiration, IP filter and the button **Continue to summary**._

Click **Continue to summary**.

## Step 5 – Check the summary

[!\[Token Summary\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-08-summary.webp?v=aa4f3bed)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-08-summary.webp?v=aa4f3bed)

_The summary shows the name, the expiration, which domains the token applies to, and the two permissions **Analytics: Read** and **Zone: Read**._

[!\[Token Summary with the optional permission\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-15-summary-insights.webp?v=e8dc6901)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-15-summary-insights.webp?v=e8dc6901)

_With the optional permission there is one more policy: **All accounts** with **Account Security Center Insights: Read**._

If anything other than **Analytics: Read** and **Zone: Read** (and **Account Security Center Insights: Read**, if you added it) is listed under **Permission policies**, click **Back** and fix it. Otherwise click **Create Token**.

## Step 6 – Copy the API Token

[!\[The token is shown once\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-09-token-created.webp?v=e03d1489)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-09-token-created.webp?v=e03d1489)

_Cloudflare shows the API Token exactly once. The token in the picture is an example and does not work._

1. Click the copy icon to the right of the token, or select the whole text and copy it.
2. Go back to the program, paste it into the field **API Token (read only)**, and click **Save and connect**.
3. Close the browser tab. You cannot see the token again; if you lose it, you simply create a new one.

The command under **Test this token** is for people who want to try the token in a terminal. You do not need to use it.

## Afterwards: the token in the list

Under **My Profile › API Tokens** the token is now in the list with the two permissions.

[!\[The API Tokens list with Huginn and Muninn\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-10-token-list.webp?v=4787a3d5)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-10-token-list.webp?v=4787a3d5)

_The list shows the name, the first and last characters of the token, the permissions and when it was last used._

## If you want to revoke the token

If you delete the program, or want to close the access for any other reason, delete the token here. Then it cannot be used by anyone, whatever happens.

[!\[The menu with Delete\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-11-token-menu-delete.webp?v=9a4643ca)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-11-token-menu-delete.webp?v=9a4643ca)

_Click **⋯** at the far right of the token's row and choose **Delete**. **Roll** gives a new token with the same permissions if you need to replace it._

[!\[Confirm deletion\](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-12-delete-confirm.webp?v=1ef6add7)](https://wi24rd.com/assets/img/manual/huginn-muninn/cf-12-delete-confirm.webp?v=1ef6add7)

_Cloudflare asks whether you are sure. **Delete** removes the token at once; the program will then say that Cloudflare rejected the API Token._

## Subdomains need no new permission

The figures per subdomain in Visitors and Attacks come from the same figures that **Analytics › Read** already gives. You do not need to change your API Token. The program does not read your DNS records.

## Health needs no new permission

Errors per hour and cache in [Health](https://wi24rd.com/en/documentation/huginn-muninn/views/operations/) also come from the figures that **Analytics › Read** already gives. You do not need to change your API Token.

## More than one account

The program takes one API Token per Cloudflare account. If you have domains on more than one account, create an API Token for each account following steps 1–6. You paste the first one in the guide. You add the others under **Settings** › **Connection** with **Add API Token…**. The domains from all accounts are shown together.

Each API Token becomes a connection in the program. The name the program shows is the account's name at Cloudflare. It is used as it is, even when it is an e-mail address, for example "…'s Account". If one API Token can see more than one account, it says, for example, "… + 1 more". If the program does not know a name yet, it says, for example, "Connection 2".

You can give the connection your own name with **Rename…** in the program. The name at Cloudflare does not change. See [Settings](https://wi24rd.com/en/documentation/huginn-muninn/settings/#connection).

## For the IT company: one token per customer

If you manage customers' domains, make one API Token per customer with **Specific zone** and the customer's domain (step 3), give the customer the token, and the customer pastes it into their own program. The customer then sees only their own domain, and you can revoke the access again without touching anything else.

[Back to Wi24rd Huginn and Muninn](https://wi24rd.com/en/documentation/huginn-muninn/)

[To the top](https://wi24rd.com/en/documentation/huginn-muninn/cloudflare/#top)

## Curious about the machinery?

The site is built on Cloudflare and is measured while you watch.

[Open the machine room](https://wi24rd.com/en/machine-room/)

[See the portfolio](https://wi24rd.com/en/software/)
