Skip to main content
You need access to the Cloudflare dashboard with permissions to create API tokens. Account Owner or Super Administrator access is recommended for full API coverage.

Finding Your Account ID

Your Account ID uniquely identifies your Cloudflare account and is required for account-scoped API calls.

1

Sign in to Cloudflare

Sign in to your Cloudflare dashboard.

2

Locate Account ID

From the left sidebar, navigate to Domains and open any domain. On the Overview page, scroll to the API section in the right sidebar.

  • Your Account ID is displayed under the API section in the right sidebar
  • Copy this value and store it securely for use later
  • Format: 32-character hexadecimal string (e.g., 023e105f4ecef8ad9ca31a8372d0c353)

Creating an API Token

Cloudflare API Tokens provide scoped access to specific resources and permissions. Create a custom token with the permissions needed for your use case.

1

Navigate to API Tokens

From the Cloudflare dashboard, click your profile icon in the top right corner.

  • Click Profile
  • Select the API Tokens tab
2

Create a Custom Token

Click the Create Token button. Under Custom token, click Get started.

3

Configure Token Permissions

Give your token a descriptive name (e.g., “StackOne Integration”) and add the required permissions. The permissions you need depend on which Cloudflare resources you want to manage.

  • Account > Account Settings (Read) — List and view accounts
  • Account > Workers Scripts (Edit) — Manage Workers scripts, builds, and cron triggers
  • Account > Workers KV Storage (Edit) — Manage KV namespaces and key-value pairs
  • Account > Workers R2 Storage (Edit) — Manage R2 buckets
  • Account > D1 (Edit) — Manage D1 databases and run queries
  • Account > Cloudflare Pages (Edit) — Manage Pages projects and deployments
  • Account > AI Gateway (Edit) — Manage AI Gateway instances and view logs
  • Account > Account Firewall Access Rules (Edit) — Manage IP access rules
  • Account > Account Rulesets (Read) — View account-level rulesets
  • Account > Load Balancing: Monitors and Pools (Read) — View LB pools and monitors
  • Account > Cloudflare Tunnel (Edit) — Manage Cloudflare Tunnels
  • Zone > Zone (Edit) — Manage zones
  • Zone > Zone Settings (Edit) — Manage zone configuration
  • Zone > DNS (Edit) — Manage DNS records and view analytics
  • Zone > SSL and Certificates (Edit) — Manage SSL certificates
  • Zone > Firewall Services (Read) — View firewall rules and WAF rulesets
  • Zone > Cache Purge (Purge) — Purge cached content
  • Zone > Load Balancers (Edit) — Manage load balancers
  • Zone > Waiting Room (Edit) — Manage waiting rooms
  • Zone > Workers Routes (Edit) — Manage Workers routes
  • Zone > Analytics (Read) — View zone analytics
  • Zone > Page Rules (Edit) — Manage page rules
  • Zone > Health Checks (Edit) — Manage standalone healthchecks
  • User > API Tokens (Read) — Required for token verification
  • User > Memberships (Read) — View account memberships
4

Set Zone and Account Resources

Under Account Resources, select your account. Under Zone Resources, choose the zones you want the token to access.

  • Select All accounts or a specific account
  • Select All zones or specific zones
  • Optionally restrict by IP address under Client IP Address Filtering
5

Select Token Type

When creating your token, you will be asked to select a Token Type.

  • Select User-owned token for tokens created under Profile > API Tokens
  • Select Account-owned token for tokens created under Account > API Tokens
  • When connecting via StackOne, select the matching Token Type to ensure successful verification
6

Create and Copy the Token

Click Continue to summary, review the permissions, and click Create Token.

  • Copy the token value immediately — it is shown only once and cannot be retrieved later
  • Store it securely for use later
  • You can test the token with the Test this token button on the confirmation page

Linking the Account from the Hub

1

Navigate to the Hub

Use one of the three Linking Account Methods to access the Hub.
2

Fill out the fields

Fill out the following fields using details from your provider:
  • API Token
  • Account ID
  • Token Type (Optional)
3

Connect

  • Click Connect
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup

If the account linking is successful, you will see the newly linked account in your Accounts page.