Skip to content

[Fundamentals] Document Wrangler OAuth token format and how to verify a token - #34355

Merged
jhutchings1 merged 2 commits into
cloudflare:productionfrom
neelakolkar-cf:issue-32027-wrangler-oauth-token-format
Oct 23, 2026
Merged

jhutchings1 merged 2 commits into
cloudflare:productionfrom
neelakolkar-cf:issue-32027-wrangler-oauth-token-format

Conversation

@neelakolkar-cf

@neelakolkar-cf neelakolkar-cf commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes #32027.

The Token formats page listed only the API key and API token prefixes (cfk_, cfut_, cfat_) and described them as the format for "Cloudflare API credentials", which implied the list was complete. It did not cover the cfoat_ OAuth tokens that wrangler login produces, or explain how to check whether a token is valid.

This PR:

  • Narrows the intro to "API keys and API tokens" and "each credential type in the following table", so the table no longer reads as the full list of Cloudflare credentials.
  • Adds a Wrangler OAuth access tokens section documenting the cfoat_ prefix, linking to wrangler login and wrangler auth token, noting that wrangler auth token refreshes an expired token, and reminding readers to treat the token as a secret.
  • Adds a Verify a token section with a curl example that sends a user API token to the Verify Token endpoint (/user/tokens/verify), as suggested in review. A valid token returns its id and a status of active.

This replaces #32730, which covered the cfoat_ prefix but not token verification, and was closed without merging.

Documentation checklist

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed 910aa68 · 0 findings · incremental

Commands
  • /review Run a review now.
  • /full-review Review the entire PR diff.
  • /disable-auto-review Stop automatic reviews.
  • /rebase Rebase against production.

@neelakolkar-cf neelakolkar-cf self-assigned this Oct 15, 2026

Treat the returned value as a secret. Do not commit it to source control or share it.

## Verify a token

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neelakolkar-cf I think this might be the better API to recommend for users. @pnlop What do you think? https://developers.cloudflare.com/api/resources/user/subresources/tokens/methods/verify/

@neelakolkar-cf neelakolkar-cf Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used this API instead, thanks! Could you please re-review?

@jhutchings1
jhutchings1 added this pull request to the merge queue Oct 23, 2026
Merged via the queue into cloudflare:production with commit a19cd5d Oct 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Token formats should also cover Wrangler CLI generated oauth tokens

2 participants