Skip to content

Conversation

@ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Dec 18, 2025

Summary

Adds documentation for the new wrangler auth token command being added in cloudflare/workers-sdk#11682. This command retrieves the current authentication token or credentials for use with other tools and scripts, similar to gh auth token in the GitHub CLI.

The documentation covers:

  • Basic command usage
  • The --json flag for structured output with token type information
  • Support for all three Wrangler authentication methods (OAuth, API token, API key/email)

Note: This PR should be merged after cloudflare/workers-sdk#11682 is merged.


Devin PR requested by mkane@cloudflare.com

Link to Devin run: https://app.devin.ai/sessions/d407c26dd1da4edf905944a95e90226a

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

Add documentation for the new `wrangler auth token` command that retrieves
authentication 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 types

Related to cloudflare/workers-sdk#11682

Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/workers/wrangler/ @cloudflare/wrangler, @irvinebroque, @cloudflare/pcx-technical-writing, @cloudflare/workers-runtime-1

- 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>
@devin-ai-integration
Copy link
Contributor

Addressed all three comments in the latest commit:

  • Removed mention of gh auth token
  • Changed json to jsonc for the code block with comments
  • Fixed priority order (API token before OAuth token)

devin-ai-integration bot and others added 5 commits December 18, 2025 10:39
Explains that API key/email requires --json flag since it uses two values instead of a single token

Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
Retrieve your current authentication token or credentials for use with other tools and scripts.

```txt
wrangler auth token [OPTIONS]
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like [OPTIONS] is not used consistenttly.

In particular it does not seem to be generated when using <WranglerCommand />.

Not a big deal but something we can address in a follow up PR (or create an issue for)

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch on the [OPTIONS] inconsistency. Happy to address this in a follow-up PR or create an issue for it.

Co-Authored-By: mkane@cloudflare.com <m@mk.gg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants