API Error: 401 {"type":"error","error":{"type":"authenticati...

Resolved 💬 33 comments Opened Aug 19, 2025 by danal443 Closed Aug 22, 2025

Bug Description
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is
currently not supported."},"request_id":"req_011CSGC6FX7ZYBFteg7RDwAF"}

Environment Info

  • Platform: win32
  • Terminal: null
  • Version: 1.0.84
  • Feedback ID: 9407d087-56c9-48d2-87a0-9df64f36c4a7

Errors

[{"error":"Error: Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the \"X-Api-Key\" or \"Authorization\" headers to be explicitly omitted\n    at file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:950:6454","timestamp":"2025-08-19T01:14:41.651Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"},\"request_id\":\"req_011CSGBgwt54cyGf9ntyixix\"}\n    at D6.generate (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:942:2449)\n    at aP.makeStatusError (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at aP.makeRequest (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-08-19T01:16:29.681Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:718:9932\n    at Q (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:677:13339)\n    at jPB (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1875:29738)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-08-19T01:16:29.698Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"},\"request_id\":\"req_011CSGBgyDSmu5nPknKDQ5v3\"}\n    at D6.generate (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:942:2449)\n    at aP.makeStatusError (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at aP.makeRequest (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async OPB.dG1.showErrors (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1875:24578)\n    at async dG1 (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1875:13705)\n    at async OPB (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1875:24429)\n    at async file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1875:19524\n    at async yN0 (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1875:5164)\n    at async G01 (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1875:19494)","timestamp":"2025-08-19T01:16:30.099Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"},\"request_id\":\"req_011CSGC6DmSR3SgxyjG4b7Aj\"}\n    at D6.generate (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:942:2449)\n    at aP.makeStatusError (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at aP.makeRequest (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-08-19T01:21:45.502Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:718:9932\n    at Q (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:677:13339)\n    at jPB (file:///C:/Users/dan/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1875:29738)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-08-19T01:21:45.521Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"},\"request_id\":\"req_011CSGC6FX7ZYBFteg7RDwAF\"}\n    at D6.generate (file:///

Note: Error logs were truncated.

View original on GitHub ↗

33 Comments

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/6052
  2. https://github.com/anthropics/claude-code/issues/5976
  3. https://github.com/anthropics/claude-code/issues/5983

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

stream2java · 11 months ago

it happened my cc too .

AliAkhtari78 · 11 months ago

The same issue is happening here. I've also subscribed to the $250 Max Plan via iOS, but in other sessions it detects me as a pro user and locks me to use Sonnet 4 only :(.

novacents · 11 months ago

it happened my cc too

pravin-santhanam27 · 11 months ago

This is also happening for me, I just signed up for the pro monthly plan

mgrahamx · 11 months ago

I get the same error

YadgarovFayzullo · 11 months ago

Same error. Did u fix it?

simonojok-glitch · 11 months ago

API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not allowed for this
organization."},"request_id":"req_011CSGwJ2hH5idbf2uY9jM8g"} just happened on mac os

hgabha · 11 months ago

Same here...just subscribed to claude for a project but now I can't use it

API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."},"request_id":"req_011CSGxeVLab5eZsBgGc2bs4"}

pattycodes · 11 months ago

same error

vatadepalli · 11 months ago

Looks like I just had to close logout claude, close by current terminal session and open a new one.

bingshuoguo · 11 months ago

same error to me, have you fixed it ?

sap-anan · 11 months ago

/logout
and then..
/model
I change to use opus4 only and it work +

swoopsus · 11 months ago

Unfortunately that is a temp fix: it will stop working. Here is the breakdown of this bug:

  • Hit rate limit: Get 401. Logout and back in fixes it. Twice.
  • Third time? That stops working no matter what you do.
  • After that, you have to downgrade to 1.0.81 to get back to work.
  • GREAT, that works a few times, BUT,
  • THEN it starts ignoring your no auto update rule, and updates you to the latest versions (82, 83, and now 84), with the BUG
  • NOW you have to downgrade every time you hit the limit.

We need this fixed.

patrg444 · 11 months ago

uninstalling and then installing worked for me

Joir-Jio · 11 months ago

same here

stream2java · 11 months ago

low your version to .1
it can works

YadgarovFayzullo · 11 months ago
low your version to .1 it can works

how did u lower version?

brunnocruzf · 11 months ago

mesmo erro aqui tambem
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not
supported."}

SkyrookieYu · 11 months ago

In Windows, I deleted {User}\\.claude directory. It worked for me.

ani03sha · 10 months ago

I was able to resolve this issue by running the following command in macOS

unset DISABLE_PROMPT_CACHING
mqkotoo · 10 months ago

I had the same error.
In my case, I was working in the terminal where I had installed Claude Code, so I deleted that terminal and created a new one, and the error disappeared.

neilgilleran · 10 months ago
I had the same error. In my case, I was working in the terminal where I had installed Claude Code, so I deleted that terminal and created a new one, and the error disappeared.

This is what I did. I had hit my usage limit with my subscription. I used /login and logged in with my Anthropic Console account instead. I wasn't able to use /login to get back into my subscription once it had reset.

I closed the terminal, opened claude, selected /login and it worked fine.

LeBaronDeCharlus · 10 months ago

Same here, closing terminal and reopen fix it without /login again, but weird…

mrfy · 10 months ago
I had the same error. In my case, I was working in the terminal where I had installed Claude Code, so I deleted that terminal and created a new one, and the error disappeared.

That helps me too! Thanks

ymw0331 · 10 months ago

I solved it by starting a new terminal session, which works too.

dillweed · 10 months ago

I solved this error by switching my default browser from Edge to Chrome and then executing /login again. The Anthropic account auth was successful.

DylanBergmann2502 · 10 months ago

I've fixed it by updating claude code: npm update -g @anthropic-ai/claude-code

mawildoer · 10 months ago
I've fixed it by updating claude code: npm update -g @anthropic-ai/claude-code

Can confirm - upgrade solved it for me too

zepef · 10 months ago

Hello, the best practice is to delete your .credentials file in user/.claude dir and then re-authenticate with /login inside claude code. Hope this helps.

xpluscal · 10 months ago
Hello, the best practice is to delete your .credentials file in user/.claude dir and then re-authenticate with /login inside claude code. Hope this helps.

On mac or windows? Cant see a .credentials in the claude user folder

zepef · 10 months ago

Hi Calvin, I'm using CC under WSL/Windows. I suppose there is always a .claude folder to hold credentials whichever the OS you are using. All the best.
________________________________
De : Calvin Hoenes @.*>
Envoyé : jeudi 28 août 2025 06:10
À : anthropics/claude-code
@.*>
Cc : Pierre-Emmanuel FEGA @.>; Comment @.>
Objet : Re: [anthropics/claude-code] API Error: 401 {"type":"error","error":{"type":"authenticati... (Issue #6078)

[https://avatars.githubusercontent.com/u/3706722?s=20&v=4]xpluscal left a comment (anthropics/claude-code#6078)<https://github.com/anthropics/claude-code/issues/6078#issuecomment-3231791184>

Hello, the best practice is to delete your .credentials file in user/.claude dir and then re-authenticate with /login inside claude code. Hope this helps.

On mac or windows? Cant see a .credentials in the claude user folder


Reply to this email directly, view it on GitHub<https://github.com/anthropics/claude-code/issues/6078#issuecomment-3231791184>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAFKP5MIT4WDEKHYOZSV2S33PZ6MDAVCNFSM6AAAAACEGWRXEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMZRG44TCMJYGQ>.
You are receiving this because you commented.Message ID: @.***>

github-actions[bot] · 10 months ago

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.