API Error: 401
Status Closed — not planned
Maintainer reply None cached
Activity 14 comments · opened Jul 22, 2025 · closed Jan 23, 2026
Bug Description
API Error: 401
{"type":"error","error":{"ty
pe":"authentication_error","
message":"OAuth
authentication is currently
not allowed for this
organization."}}
Environment Info
- Platform: darwin
- Terminal: cursor
- Version: 1.0.56
- Feedback ID:
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at A7 (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:797:5848)\n at file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:48013\n at Q (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n at fY (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:45724)\n at QK (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:44590)\n at SB (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:50639)","timestamp":"2025-07-22T14:47:26.929Z"},{"error":"Error: ENOENT: no such file or directory, open '/proc/version'\n at Module.readFileSync (node:fs:443:20)\n at Object.readFileSync (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:615:7077)\n at file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:615:8638\n at Q (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n at kT4 (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:62815)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-22T14:47:27.207Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not allowed for this organization.\"}}\n at V4.generate (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1249:6463)\n at dM.makeStatusError (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1266:2101)\n at dM.makeRequest (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1266:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-22T15:05:44.173Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n at JSON.parse (<anonymous>)\n at file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:9932\n at Q (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n at jGB (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1282:10304)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-22T15:05:44.183Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not allowed for this organization.\"}}\n at V4.generate (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1249:6463)\n at dM.makeStatusError (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1266:2101)\n at dM.makeRequest (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1266:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async w81.showErrors (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:14158)\n at async w81 (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2210:1704)\n at async mqB (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:14009)\n at async file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:9066\n at async JKA (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:1626)\n at async ra (file:///Users/deannewton/.nvm/versions/node/v23.11.0/lib/node_modul
Note: Error logs were truncated.
14 Comments
Experiencing the same thing, also on Darwin.
I am experiencing same
same here
edit: okay guys this might sound stupid but my problem was that my Claude subscription ran out, after paying the error disappeared lol
What a very helpful error message. It should have said "Your credentials no longer align with the principles of free-market capitalism". Which would mean that your subscription has expired.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
just restart your pc
https://github.com/anthropics/claude-code/issues/5937#issuecomment-3193859429
There's a ton of "duplicated" but Anthropic doesn't seem to care that this is happening.
This can be solved by executing
/loginin ccyup
/logoutand/loginvia claude console did it.API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid OAuth token. The provided token was not found or is
malformed."},"request_id":"req_011CVQtsprv6rbTEwoRb8muy"} · Please run /login
neither /login or /logout is working
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.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
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.