[BUG] API Error 403 Please run /login

Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Oct 2, 2025 · closed Jan 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I'm a Claude Pro user and using Claude Code via Claude Code for VS Code plugin.
I tried it on both VS Code and Cursor; after logging in to Claude Code, I was immediately and repeatedly asked to run /login.
I tested it on both Ubuntu 22.04 and Windows 11.
I also checked the .credentials.json, the subscriptionType property seems weird.

{"claudeAiOauth":{"accessToken":"sk-ant-oat01-","refreshToken":"sk-ant-ort01-","expiresAt":1759435078288,"scopes":["user:inference","user:profile"],
"subscriptionType":null}}

What Should Happen?

As a Pro user, I should be able to interact with Claude Code without seeing the error message below.

Error Messages/Logs

API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}} · Please run /login

Steps to Reproduce

  1. Open Claude Code window on VS Code or Cursor
  2. Login
  3. Type anything you like then submit
  4. Error Message

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

I don't know

Claude Code Version

2.0.1

Platform

Pro user

Operating System

Ubuntu 22.04 and Windows 11

Terminal/Shell

Cursor and VS Code

Additional Information

_No response_

View original on GitHub ↗

11 Comments

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7963
  2. https://github.com/anthropics/claude-code/issues/2040
  3. https://github.com/anthropics/claude-code/issues/5210

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

majidmanzarpour · 11 months ago

I am experiencing this every time I restart my terminal sessions

``API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CTiXPrP6kSphfbe4iZxn4"} · Please run /login``

AsDeadAsADodo · 11 months ago
I am experiencing this every time I restart my terminal sessions API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CTiXPrP6kSphfbe4iZxn4"} · Please run /login

Nah man. It's not the same. Your access token is working, your token seems not stored correctly. My token doesn't work at all, I can't do anything with it

Found 3 possible duplicate issues: 1. [[Bug] Anthropic API Error: Pro Account Authentication Forbidden #7963](https://github.com/anthropics/claude-code/issues/7963) 2. Frequent 403 "Request not allowed" errors despite Max subscription #2040 3. OAuth token revoked · Please run /login #5210 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

Not a duplicate

Found 3 possible duplicate issues: 1. [[Bug] Anthropic API Error: Pro Account Authentication Forbidden #7963](https://github.com/anthropics/claude-code/issues/7963) 2. Frequent 403 "Request not allowed" errors despite Max subscription #2040 3. OAuth token revoked · Please run /login #5210 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

Not a duplicate

AsDeadAsADodo · 11 months ago
I am experiencing this every time I restart my terminal sessions API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CTiXPrP6kSphfbe4iZxn4"} · Please run /login

Nah man. It's not the same. Your token is working, they're not stored correctly. My token doesn't work at all, I can't do anything with it.

majidmanzarpour · 11 months ago
> I am experiencing this every time I restart my terminal sessions > API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CTiXPrP6kSphfbe4iZxn4"} · Please run /login Nah man. It's not the same. Your token is working, they're not stored correctly. My token doesn't work at all, I can't do anything with it.

Ah my mistake, I'll see if there is another issue for mine

AsDeadAsADodo · 11 months ago
> > I am experiencing this every time I restart my terminal sessions > > API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CTiXPrP6kSphfbe4iZxn4"} · Please run /login > > > Nah man. It's not the same. Your token is working, they're not stored correctly. My token doesn't work at all, I can't do anything with it. Ah my mistake, I'll see if there is another issue for mine

Search for "persistence", there are a lot of issues related to yours.

russellkim · 10 months ago
### Error Messages/Logs API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}} · Please run /login

solution:
-> https://github.com/anthropics/claude-code/issues/8007#issuecomment-3384179638

github-actions[bot] · 8 months ago

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.

Jf710001011 · 8 months ago

for me: claude code in command work normally,but vscode -claude code not.
my solution:
windows path:

Users/your-username/.claude

,delete

.credentials.json

and

stats-cache.json

,then try again.
Which still keeps the saved conversations.

github-actions[bot] · 7 months ago

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.

github-actions[bot] · 7 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.