Here’s a general guide on how to generate them:
- Login to Cloudflare Dashboard: Visit the Cloudflare website and login to your account.
- Navigate to API Tokens: Once logged in, navigate to the “My Profile” section, usually found by clicking on your profile icon in the top-right corner. From there, select “API Tokens” or a similar option.

- Create a Token: Click on the “Create Token” button or similar. You may need to provide your account password or undergo two-factor authentication for security purposes.

- Choose Token Permissions: Cloudflare offers granular permissions for API tokens. You can select the specific permissions needed for the token, such as read-only access, edit access, or full control. For zone-specific operations, you’ll need appropriate permissions.
- Generate the Token: Once you’ve selected the permissions, proceed to generate the token. Cloudflare will generate a unique API token for you.
- Retrieve Zone ID: The zone ID is specific to each of your domains (zones) in Cloudflare. You can find it in the Cloudflare dashboard under the “Overview” tab for your domain. Look for the “Zone ID” field.
- Use in API Requests: Once you have both the API token and the zone ID, you can use them in your API requests. Make sure to include the token in the request headers for authentication and the zone ID if you’re performing zone-specific operations.
Remember to keep your API tokens secure and avoid sharing them unnecessarily. You can always regenerate them if they are compromised. Additionally, be cautious with the permissions you grant to your tokens to minimize the risk of unauthorized access.


