Bug Report: API Error: 403 {"error":{"type":"forbidden","message":"Reque...

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 10 comments · opened Mar 12, 2025 · closed Aug 22, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
API Error: 403 {"error":{"type":"forbidden","message":"Request not

Environment Info

  • Platform: macos
  • Terminal: iTerm.app
  • Version: 0.2.37
  • Feedback ID:

Errors

[{"error":"Error: 403 {\"error\":{\"type\":\"forbidden\",\"message\":\"Request not allowed\"}}\n    

View original on GitHub ↗

10 Comments

bcherny collaborator · 1 year ago

Can you try running /login again, and report back if you're still hitting this error?

dorekhov1 · 1 year ago

i am also getting this after logging in again.

makecent · 1 year ago

I solved it and it was because of the proxy. If you are in China, turn on your VPN and:

HTTP_PROXY=http://127.0.0.1:7890 HTTPS_PROXY=http://127.0.0.1:7890 claude

I assume that your VPN is using the port 7890.

alin-ap · 1 year ago

I have the same problem

EricZhuXYZ · 1 year ago

I have the same problem:

PermissionDeniedError: Error code: 403 - {'error': {'type': 'forbidden', 'message': 'Request not allowed'}}

BUT,I have API key already

wcvb13 · 1 year ago

I have the same problem

sheldon123z · 1 year ago
HTTP_PROXY=http://127.0.0.1:7890 HTTPS_PROXY=http://127.0.0.1:7890 claude

cool , solved

henryfeng · 1 year ago

it is still not working in china.

╭──────────────────────────╮
│ ✻ Welcome to Claude Code │
╰──────────────────────────╯

Unable to connect to Anthropic services

Failed to connect to api.anthropic.com: ERR_BAD_REQUEST

Please check your internet connection and network settings.

Note: Claude Code might not be available in your country. Check supported countries at https://anthropic.com/supported-countries

use the http_proxy

ant-kurt collaborator · 1 year ago

Hi folks, just want to reiterate our list of supported countries at https://anthropic.com/supported-countries

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