cloudflare / cloudflare/workers-sdk
📎 It looks like you are authenticating Wrangler via a custom API token set in an environment variable. Please ensure it has the correct permissions for this X [ERROR] A request to the Cloudflare API (/user/tokens/verify) failed. 🪵
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 186
Description
### What versions & operating system are you using?
.wrangler\logs\wrangler-2026-09-12_00-23-56_870.log" PS C:\Users\Wholelychit>📎 It looks like you are authenticating Wrangler via a custom API token set in an environment variable.
Please ensure it has the correct permissions for this operation.
Getting User settings...
X [ERROR] A request to the Cloudflare API (/user/tokens/verify) failed.
Invalid request headers [code: 6003]
- Invalid format for Authorization header [code: 6111]
If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose
🪵 Logs were written to "C:\Users\Wholelychit\.wrangler\logs\wrangler-2026-09-12_00-23-56_870.log"
PS C:\Users\Wholelychit>
### Please provide a link to a minimal reproduction
https://dash.cloudflare.com/f3e80898c7cd545d2bf4ffae7e181eca/home
### Describe the Bug
📎 It looks like you are authenticating Wrangler via a custom API token set in an environment variable.
Please ensure it has the correct permissions for this operation.
Getting User settings...
X [ERROR] A request to the Cloudflare API (/user/tokens/verify) failed.
Invalid request headers [code: 6003]
- Invalid format for Authorization header [code: 6111]
If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose
🪵 Logs were written to "C:\Users\Wholelychit\.wrangler\logs\wrangler-2026-09-12_00-23-56_870.log"
PS C:\Users\Wholelychit>
### Please provide any relevant error logs
_No response_
Contributor guide
Research direction
Start with the supplied .wrangler log and Wrangler’s authentication entry point for the /user/tokens/verify request, then reproduce the failure with the environment-provided custom token. Trace how the Authorization header is built and compare it with the reported 6003/6111 response. Done means the cause is identified and the authentication path handles the token format correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, cli, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100