Finish signing in via your browser: token endpoint returned status 403 Forbidden
What version of Codex is running?
No response
Which model were you using?
No response
What platform is your computer?
No response
What steps can reproduce the bug?
I’m a Plus user, and I’ve failed to log into Codex five times already. > Finish signing in via your browser: token endpoint returned status 403 Forbidden. This is really a terrible experience — much worse than Claude Code.
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
The same problem Token exchange failed: token endpoint returned status 403 Forbidden
i met this problems too. Have you fixed it?
same problem, awaiting solution
Same problem for codex cli and extension in vscode. Can we have a solution?
I have the same issue—every time I log in, I end up encountering this problem. I've tried switching browsers and numerous methods, but nothing has worked. Yet it functions perfectly on the web version. What a frustrating experience. “Token exchange failed: token endpoint returned status 403 Forbidden”
Same problem
Update the codex and delete the content in ~/.codex, then log back in; it seems this can resolve the issue.
The same
The same. I tried on windows and wsl but both failed.
I have the same issue on ubuntu20.04 vscode
I have the same issue on ubuntu20.04 vscode
Me the same, do anyone know how to fix?
I have the same issue on ubuntu20.04 vscode 我在 Ubuntu 20.04 vscode 上也遇到了同样的问题
Me the same, do anyone know how to fix? 我也是,有人知道怎么修复吗?
可以试试卸载重新安装插件试试
i have the same problem
Hi Community, I have a solution for this bug
OS: Ubuntu 20.04 VS Code: APT / .deb version Browser: Firefox Network: Optional proxy via Clash Verge Issue: VS Code Codex login fails Token exchange failed: token endpoint returned status 403 Forbidden
FIX:
- Ensure localhost never goes through proxy
{export NO_PROXY=127.0.0.1,localhost,::1}
- If using proxy (Clash / V2Ray), use HTTP port (example 10809)
{ export http_proxy=http://127.0.0.1:10809 export https_proxy=http://127.0.0.1:10809 }
- VS Code settings.json
{ "http.proxy": "http://127.0.0.1:10809", "http.noProxy": "127.0.0.1,localhost,::1", "http.proxySupport": "override" }
- Browser Use system proxy Under Settings -- Network Settings -- Use system proxy settings -- No proxy for {localhost, 127.0.0.1}
You may noticed that after you re-open your pc, the vscode can not be opened properly, for everytime you wanna open your vscode, type {code --disable-layout-restore --user-data-dir /tmp/vscode-fix & }
I haven't fix this issue yet
I signed in to codex.
I use Windows + WSL, My nekoray (nekobox) running on Windows listens on 0.0.0.0:20800, and ip: 192.168.7.114
All you need to do is edit bashrc in WSL:
add to /etc/environment (if vscode run from root) or to ~./bash.rc (if from user)
export ALL_PROXY="socks5h://192.168.7.114:20800"
export http_proxy="$ALL_PROXY"
export https_proxy="$ALL_PROXY"
export NO_PROXY="127.0.0.1,localhost,::1"
export no_proxy="$NO_PROXY"
Then restart vscode and try