What is going on
You sign in to Codex in the terminal, the editor extension or the desktop app. The browser says you are signed in, and then Codex shows token exchange failed: error sending request for url (https://auth.openai.com/oauth/token).
The browser step worked. What failed is the next one: Codex itself could not reach OpenAI's sign-in server to finish the login. That points to something between your computer and the internet, not to your account.
Error messages you might see
Common causes
- A VPN, proxy or company network that lets your browser through but blocks or changes the request Codex makes. Proxy settings added in one terminal window are often not seen by the desktop app or the editor extension.
- A DNS filter or local DNS helper (some VPN and security tools use one) that the Codex program does not resolve names through.
- Windows with WSL: the editor extension started Codex inside WSL, or another program is holding the local port used for sign-in. One reported case was
wslrelay.exeholding port 1455. - A company proxy that replaces the website's security certificate, which Codex does not trust.
- Damaged sign-in data left over from an earlier attempt.
How to fix it
These steps come from reports by other users. They are not an official guarantee, and the cause differs from one setup to another.
- From the same computer, run
curl -I https://auth.openai.com/.well-known/openid-configuration. A normal response means the machine can reach the server. If this works but Codex still fails, suspect proxy settings, DNS or WSL. - Turn off any VPN, DNS filter or security proxy for a minute and try again.
- If you use a proxy, set
HTTPS_PROXYandNO_PROXYfor your whole user account, not only one terminal. Includelocalhost,127.0.0.1inNO_PROXY. Then quit Codex completely and start it again. - On Windows with WSL, sign in from a normal terminal instead of the editor extension, or turn off the extension's WSL option, then try again.
- Sign out and in again:
codex logout, thencodex login, thencodex login statusto check. - Try
codex login --device-auth, which signs you in with a code on another device. It can fail for the same network reasons.
If none of this works, a developer can look at your network and proxy settings with you on a call.
Getting help takes about a minute
No hiring, no back and forth. A real person looks at your app.
-
1
Describe it
Tell us what you need in plain words. You don't have to be technical or have an account to start.
-
2
Free 15-minute call
A verified developer calls you. Many tasks are sorted right there, and it costs nothing.
-
3
Pay after you approve
If there is more to do, you get one fixed price up front. You pay only once you are happy.
Real people, reviewed by hand
Developers who do this every day
Every developer is approved by our team before they can take a task. Describe yours and the first one who is free picks it up.
Get helpQuestions
Does this mean my OpenAI account is blocked?
Usually not. The error means Codex could not reach the sign-in server from your computer. Account access is a likely cause only if a workspace admin has restricted it, which the message mentions separately.
Why does the browser say I am signed in but Codex does not?
The browser finishes its part, then Codex has to make its own request to complete the login. A proxy, VPN or DNS setting can block that second request while the browser works fine.