[BUG] OAuth error: Request failed with status code 400
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?
hi,
hopefully someone has an idea how to fix the following. thanks in advance!
i am using vs code.
installed the official extension "Claude Code for VS Code".
trying to log in using Anthropic Console account to use pay as you go api usage billing.
i open the link in the browser and click authorize.
but then immediately get the error
_OAuth error: Request failed with status code 400_
Same behaviour if i copy and open the authorization link in the browser manually.
i am getting the code which i should input in claude code in vs code to complete authorization.
i do that but i also get the same error message after i submit that.
Behaviour is the same no matter if i use the ui or terminal.
Please help!
---
Claude Code
Version 2.1.123:
VS Code
Version: 1.118.0 (user setup)
Commit: 9b8ae15a8cf95b9bce1b590b42954530f440e816
Date: 2026-04-28T15:54:22-07:00
Electron: 39.8.8
ElectronBuildId: 13870025
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
What Should Happen?
Authorization should finish successfully 😅
Error Messages/Logs
OAuth error: Request failed with status code 400
Steps to Reproduce
Try to login
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.123
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Same behaviour in windows powershell (with and without admin rights)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗