[Bug] Anthropic API Credential Restriction Preventing API Requests
Resolved 💬 102 comments Opened Sep 23, 2025 by chandarith-chea Closed Jan 9, 2026
Bug Description
I always got this message when request to do something: "This credential is only authorized for use with Claude Code and cannot be used for other API
requests"
Environment Info
- Platform: darwin
- Terminal: WarpTerminal
- Version: 1.0.120
- Feedback ID: d283f24e-36b3-445f-a47c-2a3cd427c3fd
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"This credential is only authorized for use with Claude Code and cannot be used for other API requests.\"},\"request_id\":\"req_011CTQmv1MVzrMnxDP9yRrLF\"}\n at i9.generate (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:992:2412)\n at IP.makeStatusError (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1009:2131)\n at IP.makeRequest (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1009:5344)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async RJB.ZI1.showErrors (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:29907)\n at async ZI1 (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:18054)\n at async RJB (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:29690)\n at async file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:24439\n at async aq0 (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:4362)\n at async u01 (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:24409)","timestamp":"2025-09-23T05:24:32.974Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"This credential is only authorized for use with Claude Code and cannot be used for other API requests.\"},\"request_id\":\"req_011CTQmwFaHqwWFkrKLKXHox\"}\n at i9.generate (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:992:2412)\n at IP.makeStatusError (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1009:2131)\n at IP.makeRequest (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1009:5344)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async RJB.ZI1.showErrors (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:29907)\n at async ZI1 (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:18054)\n at async RJB (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:29690)\n at async file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:24439\n at async aq0 (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:4362)\n at async u01 (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:24409)","timestamp":"2025-09-23T05:24:49.873Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"This credential is only authorized for use with Claude Code and cannot be used for other API requests.\"},\"request_id\":\"req_011CTQnAR1BkGSfwnuM36VMN\"}\n at i9.generate (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:992:2412)\n at IP.makeStatusError (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1009:2131)\n at IP.makeRequest (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1009:5344)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async RJB.ZI1.showErrors (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:29907)\n at async ZI1 (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:18054)\n at async RJB (file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:29690)\n at async file:///Users/macbookpro16m2max/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1919:24439\n at async aq0 (file:///Users/macboo
Note: Error logs were truncated.
102 Comments
started this morning
same here
Windows VSCode
Using Claude Code
> claude doctor⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This credential
is only authorized for use with Claude Code and cannot be used for other API
requests."},"request_id":"req_011CTQxWurzPBesaHzT67FW6"}
UPD: relogin helped
I've tried running
claude setup-tokenagain and the issue still persists. Started this morning for me too.Yes, I see the same error. Yesterday it worked fine.
<img width="1489" height="64" alt="Image" src="https://github.com/user-attachments/assets/aee917ed-25e2-429f-b9b1-fc87e20f838b" />
I see this error (Mac VSCode, using claude code)
<img width="866" height="60" alt="Image" src="https://github.com/user-attachments/assets/fb9a1aa0-aa1c-4c69-a928-a41cb35e74f5" />
Seems to be affecting zed through ACP too.
My experience is that when Claude fixed Claude App and API connectivity errors, certain users are required to re-anthentic their account but the API error didn't prompt that. The workaround is to run
claude /loginThis worked for me. Just re-login.
Yes, work for me too with re-login.
Not for me. After Re-Login it's the same
Still failing after
claude setup-tokenstill failing after re-login here, but I still had an export for an existing CLAUDE_CODE_OAUTH_TOKEN. Once I removed that export and tried "claude /login" it worked for me.
Also affects the Claude GitHub integration for PR reviews
Hi, also fixed with claude /login, thanks
Also having the problem seems today with OpCode (name was 'Claudia' before), re-logged in without any better result.
It seems I can still use Claude Code by selecting Claude Sonnet 4 but not anymore using Claude Opus 4.1 where I do have this error 400.
Confirming
claude /loginfixes this problem for me in Claude Code.Hi, Confirming as well that
claude /logoutand thenclaude /loginfixes in Claude Code.I can confirm that logging out and then back in (
claude /logoutand thenclaude /login) resolved the issue.By the way, before it was fixed, I had access to Opus 4.1 despite being only on the Pro plan. Now back to normal.
I found the cause of the problem, because after the claude code update, the recommended configuration was updated, but this recommended configuration is not applicable to Pro subscribers.
You can use the /model command to see the model currently used by Claude Code, which will output:
The default configuration uses the Opus 4.1 model, which is not available for the pro subscription, which is also the root cause of the error.
Select "3. Sonnet", problem solving.
@zorth44 Thank you, this works! So it's only a problem for Pro users.
Thanks to @zorth44's comment, it's now also clear how to fix the GitHub code review workflow: The default setting now also appears to try to use the Opus model. So Pro users need to explicitly ask for Sonnet in
claude-code-review.yml:claude_args: '--model sonnet --allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'This issue also affects the Claude GitHub integration for PR reviews. Previously, it automatically used
claude-opus-4-1-20250805model and even worked with Pro accounts.Here is what I've found in Claude Code Preview logs with a Pro account showing the mixed model usage:
for the recently released sonnet 4.5, use this instruction to fix it.
Tell this to your Claude Code or Codex Cloud
---
.github/workflows/claude.yml. In theRun Claude Codestep, setclaude_argsto--model claude-sonnet-4-5-20250929, preserving every other setting in the workflow..github/workflows/claude-code-review.yml. In theRun Claude Code Reviewstep, update theclaude_argsstring so it starts with--model claude-sonnet-4-5-20250929while leaving the quoted--allowed-toolslist untouched.Add model argument to Claude workflows, and push the branch.This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
IT STILL OCCURS
Just got this now in opencode
@GukDev lmao me too
same
same
I'm having it now in opencode
I just ran into this on opencode as well — logging out and back in had no effect, the problem keeps happening
Same here: Opencode and tried to re-login. I hope they're not forcing us to just use claudeCode.
Time to code a work around in CC with Opus to get CC sub working in OpenCode again!
we are going back to September 23 2025, instead of moving forward lol
Also just got this issue
We got back in time. Isn't it guys?
just got bombed out as well. Not sure how to get it to work again. sigh.
Also Opencode. I just renewed my subscription a few hours ago. This just interrupted my work. If they really start restricting to use other tools WITHOUT ANY ANNOUNCEMENT, I'm out.
"Ich bin du, Jonas"
Just got this in opencode as well.
looks like im not the only one
got the same issue
Same issue.
Got it using clawdbot. Hope I can clear it.
Fuck I got the same issue
me too, why does it matter what harness??? didn't we pay for the compute?
Same here
Getting this issue on RooCode as well, using Claude Code as the API Provider / Even with 0Auth Sign-in / Still getting this Error
I'm experiencing this issue as well.
Same here
Same issue here. Re-auth with opencode or claude code does not work.
Same. So frustrating.
anthropic want everyone to open CC and allow data sharing for improving their models 💀
Bro I just got on this bandwagon today, what the helly
Anyone with an academic .edu license might be able to get github copilot for free, so I was able to spin up Claude 4.5 via my github copilot auth within OpenCode. However, my main Claude subscription no longer authenticates in OpenCode.
Just got this in opencode as well, on a claude max subscription.
the same here in opencode... are we gonna get forced to use Claude code or are they gonna try to sneak an upsell in our subscriptions?
<img width="2126" height="318" alt="Image" src="https://github.com/user-attachments/assets/5dff4594-e0ca-4b75-b68f-5e9beffc1dd4" />
I'm having the same issue too, only in opencode though, everything's fine in claude code cli. tried logging in again but it didn't help
Getting this too! That is not cool at all for $200 a month
anyone found a fix yet?
It looks like there are a few comments from the last few hours. I also have an expensive subscription. Seems like Opencode is logging in fine, but using the token doesn't work
<img width="936" height="229" alt="Image" src="https://github.com/user-attachments/assets/d19709d3-2125-4b5d-bb94-ad01ac30d6c4" />
<img width="912" height="74" alt="Image" src="https://github.com/user-attachments/assets/8a3c766c-a724-4cc5-a07b-1c96ac1aa633" />
same here stoped working with open code
I forgot how to code, fix this or I'll be fired.
Hitting this too. It's a real shame too - I got a ton of appreciation of my subscription and it's price from being able to use my subscription in the way that best suited me.
please fix this. was perfectly fine yesterday. also using opencode with a claude max subscription.
Same issue here. Saw this error when i tried it with OpenCode.
same issue here with opencode
Pinging just so i know when its resolved
Pinging just to know it resolved
Pinging just so i know when its resolved
Same here in opencode as well
<img width="811" height="76" alt="Image" src="https://github.com/user-attachments/assets/2b17ef33-1284-4a20-8550-2be527ea1a3b" />
Same issue with opencode, yesterday it was working in opencode, today its not
glad I'm not the only one... was freaking out... better get this fixed or I'll look for a job at Walmart or something similar
The chiringuito is over https://github.com/charmbracelet/crush/pull/1783
Just as I figured. They are blocking 3rd party clients and instead of just outright announcing it, you have to FA&FO. Nice!
ping
ping
ping
ping 👀
ping 🎅🏾
ping
ping
👀
ping
Just saying
pingor commenting is only making this thread difficult to read.. there is a possible solution by using https://github.com/anomalyco/opencode-anthropic-auth as referenced from @n2k3 solution ->But BEWARE it might get you banned because Anthropic seems to not want to allow you to do this.
ping
same. yesterday it worked okay, they must have changed something
same problem
ping
fk anthrophic
Looks like this workaround isn't working around anything anymore 🥲 love the people still typing ping, real "aiprenueur" vibes 😅
Fuck, their patch it
ping
ping
https://github.com/anthropics/claude-code/issues/17118
My workaround:
Step 1:
https://claude.ai/new , click on profile picture (bottom left corner), "Request help", request a refund via their chatbot (I used the reason "other"). For me it worked, they already confirmed the refund.
Step 2:
Subscribe to Minimax and GLM, accept slightly lower quality but at the same time be safe from stuff like that happening again (without prior warning, and THAT is what really annoys me about the situation) because the models are open and cheap so you can just switch providers if necessary. And btw this also saves you a lot of money and I've never managed to even get close to their limits while even with the most expensive Claude Max subscription I had to slow down multiple times.
Step 3:
Watch Anthropic go down because they overestimated the value of their ecosystem and how much developers hate to be locked into a closed system.
VERY interesting how it suddenly does not work anymore after people have been stating they were migrating to OpenCode because Anthropic refuses to fix this recurrent showstopping bug
"how much developers hate to be locked into a closed system."
😂🤣😂🤣 laughs at how large the iOS dev scene is
Same problem - very upsetting.
Just became a user yesterday and it worked great, now - I'm here 🙃
Yup, got this today as well. Worked for me until yesterday. Smells very bad to lock people in to their apps – who else have I hated on over the decades for this same behavior, let me think… Oh yes.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.