- Notifications
You must be signed in to change notification settings - Fork10.9k
docs: addwrangler auth token command documentation#27219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:production
Are you sure you want to change the base?
Conversation
Add documentation for the new `wrangler auth token` command that retrievesauthentication credentials for use with other tools and scripts.Documents:- Basic usage- --json flag for structured output with token type- Support for OAuth, API token, and API key/email auth typesRelated tocloudflare/workers-sdk#11682Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
github-actionsbot commentedDec 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This pull request requires reviews fromCODEOWNERS as it changes files that match the following patterns:
|
github-actionsbot commentedDec 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
| {"type":"api_key","key":"...","email":"..." } | ||
| ``` | ||
| This is similar to`gh auth token` in the GitHub CLI and allows you to easily retrieve your authentication token without having to manually locate the config file or handle token refresh. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
No need to mention gh
| Thisis similar to`gh auth token` in the GitHub CLI andallows you to easily retrieve your authentication token without having to manually locate the config file or handle token refresh. | |
| This allows you to easily retrieve your authentication token without having to manually locate the config file or handle token refresh. |
| When using`--json`, the output includes the token type: | ||
| ```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| ```json | |
| ```jsonc |
| - OAuth token from`wrangler login` (automatically refreshed if expired) | ||
| - API token from`CLOUDFLARE_API_TOKEN` environment variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The priority is the other way aorund
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should also mention the key and email option, and explain how it's not supported without the json flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Added API key/email to the list of authentication methods with an explanation that it requires the--json flag since this method uses two values instead of a single token.
- Remove mention of gh auth token- Change json to jsonc for code block with comments- Fix priority order (API token before OAuth token)Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
Addressed all three comments in the latest commit:
|
Explains that API key/email requires --json flag since it uses two values instead of a single tokenCo-Authored-By: mkane@cloudflare.com <m@mk.gg>
Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
…it-manager.devin.ai/proxy/github.com/cloudflare/cloudflare-docs into devin/1766046371-wrangler-auth-token-docs
Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
Uh oh!
There was an error while loading.Please reload this page.
Summary
Adds documentation for the new
wrangler auth tokencommand being added incloudflare/workers-sdk#11682. This command retrieves the current authentication token or credentials for use with other tools and scripts, similar togh auth tokenin the GitHub CLI.The documentation covers:
--jsonflag for structured output with token type informationNote: This PR should be merged aftercloudflare/workers-sdk#11682 is merged.
Devin PR requested bymkane@cloudflare.com
Link to Devin run:https://app.devin.ai/sessions/d407c26dd1da4edf905944a95e90226a
Documentation checklist