CLOUDFLARE_API_TOKEN=cfat_9f2a1c8e npx wrangler whoami

Category: Cloudflare

CLOUDFLARE_API_TOKEN=cfat_9f2a1c8e npx wrangler whoami

Authenticate wrangler via an API token env var

Lets wrangler authenticate without a browser, which is the standard pattern for CI, containers, and remote machines. Tokens starting with cfat_ are account-scoped API tokens; scopes decide what commands may run, so a DNS-only token fails on Workers operations. CLOUDFLARE_API_KEY plus CLOUDFLARE_EMAIL works as an alternative pair.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.