wrangler auth token retrieves configured credentials
Introduced 2026-01-07 · score 0.96
HOW TO USE IT
When a script needs Wrangler’s configured credentials, run `wrangler auth token`; add `--json` for structured output with token type, including API key/email credentials.
wrangler auth tokenwrangler auth token --jsonWHY THIS HELPS
When a script needs Wrangler’s currently configured authentication credential, retrieve it for the integration.
REQUIREMENTS AND LIMITATIONS
- Version: 4.57.0
- --json: Returns JSON with token type; required to retrieve API key/email credentials.
- Prerequisite: An authentication method must be available: `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_API_KEY` plus `CLOUDFLARE_EMAIL` (with `--json`), or an OAuth token from `wrangler login`.
- Returns whichever authentication method is currently configured.
FIRST-PARTY EVIDENCE
- https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.57.0
- https://developers.cloudflare.com/workers/wrangler/commands/general/
Check the installed version and the source before using it. Entry JSON