claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

OAuth Success on web page but Error in Terminal: OAuth error: Unable to create API key.

Open dongshuju opened this issue 1 year ago • 8 comments

Browser didn't open? Use the url below to sign in:

https://console.anthropic.com/oauth/authorize?client_id=9d1c250a-e61b-44d9-88ed-5944d1962f5e&response_type=code&redirect_uri=%2Foauth%2Fcode%2Fcallback&scope=org%3Acreate_api_key+user%3Aprofile&code_challenge=ANiqwjfvCsOdTQn0cIskDiPiO865vUPWW2sKQAaMWIQ&code_challenge_method=S256&state=AHCEIU9-YEyKqhFiyEPEyB7hKXVXBgrOchFkWDDP7uI

OAuth error: Unable to create API key. The server accepted the request but didn't return a key.

Press Enter to retry.

OAuth error

Image

Image

dongshuju avatar Feb 28 '25 08:02 dongshuju

Image same error

wcvb13 avatar Mar 07 '25 06:03 wcvb13

Same, won't work with proxy env vars (HTTPS_PROXY etc.) either. Can use manually created API key with VSCODE extension cline tho.

joeybuddy avatar Mar 10 '25 12:03 joeybuddy

same issue

Abenu10 avatar Mar 10 '25 13:03 Abenu10

Image

same issue

lynxlangya avatar Mar 12 '25 08:03 lynxlangya

Image

same issue

How to fix it?

lynxlangya avatar Mar 12 '25 08:03 lynxlangya

same issue on 0.2.37

dorekhov1 avatar Mar 12 '25 11:03 dorekhov1

This is fixed on more recent versions. Restart to update!

bcherny avatar May 06 '25 18:05 bcherny

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.

github-actions[bot] avatar Aug 09 '25 14:08 github-actions[bot]