Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through obtaining credentials for the Cloudflare plugin.

Authentication Method

The Cloudflare plugin uses API key authentication (Cloudflare API tokens sent as Authorization: Bearer).
  • api_key (default) — Cloudflare API token

API Token

Step 1: Create a token

  1. Sign in to the Cloudflare dashboard.
  2. Go to My ProfileAPI TokensCreate Token.
  3. Use a template or Create Custom Token with permissions for what you need (for example Zone Read, DNS Read, Workers Scripts Read on your account/zones).
  4. Copy the token immediately — it is shown only once.
Storing credentials:
pnpm corsair setup --plugin=cloudflare api_key=your-cloudflare-api-token
Or pass the token in plugin options:
corsair.ts
cloudflare({
	key: process.env.CLOUDFLARE_API_TOKEN,
})
Verify:
pnpm corsair auth --plugin=cloudflare --credentials

Required Credentials Summary

CredentialRequired forWhere to find
API tokenapi_key authDashboard → My Profile → API Tokens
For general information about how Corsair handles authentication, see Authentication.