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.
33 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
it happened my cc too .
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 :(.
it happened my cc too
This is also happening for me, I just signed up for the pro monthly plan
I get the same error
Same error. Did u fix it?
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
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"}
same error
Looks like I just had to close logout claude, close by current terminal session and open a new one.
same error to me, have you fixed it ?
/logout
and then..
/model
I change to use opus4 only and it work +
Unfortunately that is a temp fix: it will stop working. Here is the breakdown of this bug:
We need this fixed.
uninstalling and then installing worked for me
same here
low your version to .1
it can works
how did u lower version?
mesmo erro aqui tambem
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not
supported."}
In Windows, I deleted {User}\\.claude directory. It worked for me.
I was able to resolve this issue by running the following command in macOS
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.
Same here, closing terminal and reopen fix it without /login again, but weird…
That helps me too! Thanks
I solved it by starting a new terminal session, which works too.
I solved this error by switching my default browser from Edge to Chrome and then executing /login again. The Anthropic account auth was successful.
I've fixed it by updating claude code:
npm update -g @anthropic-ai/claude-codeCan confirm - upgrade solved it for me too
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
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: @.***>
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.