API Error: 401 {"type":"error","error":{"type":"authenticati...
Resolved 💬 11 comments Opened Jul 10, 2025 by lazy-dinosaur Closed Jul 10, 2025
Bug Description
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid OAuth token. The provided token was not found or is malformed."}}
Environment Info
- Platform: linux
- Terminal: tmux
- Version: 1.0.44
- Feedback ID: e76da2de-7633-4be7-a8fa-d141328497af
Errors
[{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"Invalid OAuth token. The provided token was not found or is malformed.\"}}\n at D6.generate (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n at gq.makeStatusError (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n at gq.makeRequest (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-10T00:54:59.131Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n at JSON.parse (<anonymous>)\n at file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:618:9971\n at Q (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n at Lw2 (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1337:10306)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-10T00:54:59.141Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"Invalid OAuth token. The provided token was not found or is malformed.\"}}\n at D6.generate (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n at gq.makeStatusError (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n at gq.makeRequest (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async fA1.showErrors (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23214)\n at async fA1 (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:12720)\n at async aR2 (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23062)\n at async file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18138\n at async Y0A (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:5121)\n at async Vc (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18108)","timestamp":"2025-07-10T00:54:59.405Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"Invalid OAuth token. The provided token was not found or is malformed.\"}}\n at D6.generate (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n at gq.makeStatusError (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n at gq.makeRequest (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-10T01:00:10.681Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"Invalid OAuth token. The provided token was not found or is malformed.\"}}\n at D6.generate (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n at gq.makeStatusError (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n at gq.makeRequest (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async fA1.showErrors (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23214)\n at async fA1 (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:12720)\n at async aR2 (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23062)\n at async file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18138\n at async Y0A (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:5121)\n at async Vc (file:///home/lazydino/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18108)","timestamp":"2025-07-10T01:00:11.081Z"},{"error":"Error: 401 {\"type\"
Note: Error logs were truncated.
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗