"Sign in With ChatGPT" functionality needs to be robust against all account types
Closed this issue ยท 169 comments
The bulk of the work to support this feature was implemented in these PRs:
That said, I know there are cases where users may or may not have credits, differences between Pro and Plus, etc., and we need to be sure that all edge cases are addressed and that users see appropriate messaging.
I attempted to log in with a Plus account. I am able to use gpt-4.1, but not the default model codex-mini-latest, or the o-series models, due to the organization needing to be verified. Perhaps of note is that I've previously logged in to platform.openai.com with this account (but have not purchased credits). In the browser, the login flow completes successfully, although on the "Codex CLI wants access to your API organization" page [1], the "New organization" option [2] reports "invalid organization id" [3]; the existing default org works. Screenshots below.
: 10:11:28 ~ ; type codex
codex is /opt/homebrew/bin/codex
: 10:11:30 ~ ; codex login
Starting local login server on http://localhost:1455
If your browser did not open, navigate to this URL to authenticate:
https://auth.openai.com/oauth/authorize?response_type=code&client_id=app_XXXXXXXXXXXXXXXXXXXXXXXX&redirect_uri=http%3A%2F%2Flocalhost%3A1455%2Fauth%2Fcallback&scope=openid+profile+email+offline_access&code_challenge=XXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXX&code_challenge_method=S256&id_token_add_organizations=true&state=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Credit redemption request failed: HTTP Error 400: Bad Request
Successfully logged in
: 10:12:13 ~ ; codex --version
codex-cli 0.2.0
Entering a prompt into Codex then results with this error:
ERROR: unexpected status 400 Bad Request: {"error": {"message": "Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate." "type": "invalid_request_error", "param": "reasoning.summary", "code": "unsupported_value" }}
I have not completed the "Verify Organization" workflow as that requires purchasing credits, which I would not like to do at this time.
Using codex -m gpt-4.1 DOES work.

I attempted to log in with a Plus account. I am able to use gpt-4.1, but not the default model codex-mini-latest, or the o-series models, due to the organization needing to be verified. Perhaps of note is that I've previously logged in to platform.openai.com with this account (but have not purchased credits). In the browser, the login flow completes successfully, although on the "Codex CLI wants access to your API organization" page [1], the "New organization" option [2] reports "invalid organization id" [3]; the existing default org works. Screenshots below.
: 10:11:28 ~ ; type codex codex is /opt/homebrew/bin/codex : 10:11:30 ~ ; codex login Starting local login server on http://localhost:1455 If your browser did not open, navigate to this URL to authenticate: https://auth.openai.com/oauth/authorize?response_type=code&client_id=app_XXXXXXXXXXXXXXXXXXXXXXXX&redirect_uri=http%3A%2F%2Flocalhost%3A1455%2Fauth%2Fcallback&scope=openid+profile+email+offline_access&code_challenge=XXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXX&code_challenge_method=S256&id_token_add_organizations=true&state=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Credit redemption request failed: HTTP Error 400: Bad Request Successfully logged in : 10:12:13 ~ ; codex --version codex-cli 0.2.0Entering a prompt into Codex then results with this error:
ERROR: unexpected status 400 Bad Request: {"error": {"message": "Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate." "type": "invalid_request_error", "param": "reasoning.summary", "code": "unsupported_value" }}I have not completed the "Verify Organization" workflow as that requires purchasing credits, which I would not like to do at this time.
Using
codex -m gpt-4.1DOES work.
Same here, doesn't work for me
I get this when I try to login to ChatGPT
Route Error (500 ): "The operation is insecure."
I only see requests to datadog being blocked by uBlock Origin.
Using Firefox 140.0.2
FWIW This flow does not degrade gracefully with a company-provided ChatGPT account that does not have access to platform.openai.com.
Codex works on the hosted Web UI (as expected) but without API access, codex-cli cannot work. The login fails with a "Authentication Error - No eligible ChatGPT account found." error on the web auth flow. This requires a Ctrl-C in the terminal.
(for the avoidance of doubt - I don't expect the login flow or codex-cli to work without access to the API, but it could potentially handle the error more gracefully).
I logged in using my ChatGPT account (I am a plus subscriber) and I get the following error.
Credit redemption request failed: 400 Bad Request
The model "codex-mini-latest" does not appear in the list of models available to your account. Double-check the spelling (use
openai models list
to see the full list) or choose another model with the --model flag.
I tried to use the --model option to use GPT-4.1 but it showed that I do not have enough quota.
I believe I should have access to Codex as a ChatGPT Plus customer right?
I'm also Plus subscriber and getting error
"ERROR: unexpected status 400 Bad Request: {"error": {"message": "Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate." "type": "invalid_request_error", "param": "reasoning.summary", "code": "unsupported_value" }}" while trying to use codex in interactive mode with codex-mini-latest enabled. Are plus users limited to GPT-4.1 or something? ๐ค
Now I get this instead...
Route Error (409 ): {
"error": {
"message": "Invalid client. Please start over.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_state"
}
}Seems to be on another datadog.client initiated request against the auth endpoint https://auth.openai.com/api/accounts/authorize/continue
i ran that over an ssh connection. Therefore the redirection to the localhost part can never work. I know this is an edge case but if we can allow hand copy the redirect link to the console the process can then move on to the next part.
I also tried curl the redirect link on a separate terminal.
the main thread i got
d@1e018257db70:~/.codex$ codex login
Starting local login server on http://localhost:1455
If your browser did not open, navigate to this URL to authenticate:
https://auth.openai.com/oauth/authorize?response_type=code&client_id=app_EMoamEEZ73f0CkXaXp7hrann&redirect_uri=http%3A%2F%2Flocalhost%3A1455%2Fauth%2Fcallback&scope=openid+profile+email+offline_access&code_challenge=XEFlBejjSmvmkM0bG1K_stCfnITiA3WRdivnH_QRKwo&code_challenge_method=S256&id_token_add_organizations=true&state=e3bbecc0ed7353991648446fa0be9da09e54ff9fe70ae4c1f8b1058ef3cf8714
Error logging in: login_with_chatgpt subprocess failed:
d@1e018257db70:~/.codex$
the 2nd thread:
d@1e018257db70:~$ curl http://localhost:1455/auth/callback?code=ac_VRjn8dya2yvWS7XszsT0q_2SWKJO-oDiVyY9t-Rj4R0.OPr7Cv_sCWoF6lP5d8pNJWcmE7Q3lMEaoTddVsoTCoE&scope=openid+profile+email+offline_access&state=e3bbecc0ed7353991648446fa0be9da09e54ff9fe70ae4c1f8b1058ef3cf8714
[1] 10436
[2] 10437
d@1e018257db70:~$ <!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code: 400</p>
<p>Message: State parameter mismatch.</p>
<p>Error code explanation: 400 - Bad request syntax or unsupported method.</p>
</body>
</html>
[1]- Done curl http://localhost:1455/auth/callback?code=ac_VRjn8dya2yvWS7XszsT0q_2SWKJO-oDiVyY9t-Rj4R0.OPr7Cv_sCWoF6lP5d8pNJWcmE7Q3lMEaoTddVsoTCoE
[2]+ Done scope=openid+profile+email+offline_access
Have the same issue as @javichu148
and after
This some logs
mac system
I have plus subscription
It seems that this is a very recent problem?
#1481
Same here, on ubuntu.
Same issue as @lemessdavi, plus subscription using macOS
I have a "Team" account and tried to login. After I login succesfully, in the terminal I see:
Only users with Plus or Pro subscriptions can redeem free API credits.
Successfully logged in
which is quite confusing ๐ซค
Do I have access to Codex CLI or not?
Plus user. Mac 15.5 (24F74). Login with Apple. After logging in and clicking continue on the "Codex CLI wants access to your API organization" page, I'm redirected to: http://localhost:1455/auth/callback?code=[redacted]&scope=openid+profile+email+offline_access&state=[redacted]
And the below error:
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.
Plus user. Mac 15.5 (24F74). Login with Apple. After logging in and clicking continue on the "Codex CLI wants access to your API organization" page, I'm redirected to: http://localhost:1455/auth/callback?code=[redacted]&scope=openid+profile+email+offline_access&state=[redacted]
And the below error:
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.
Was actually able to fix this by running Install\ Certificates.command from python directory.
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.
MacOS 26.0 Beta
This worked for me:
pip3 install --upgrade certifi
export SSL_CERT_FILE="$(python3 -c 'import certifi; print(certifi.where())')"Plus user. Mac 15.5 (24F74). Login with Apple. After logging in and clicking continue on the "Codex CLI wants access to your API organization" page, I'm redirected to: http://localhost:1455/auth/callback?code=[redacted]&scope=openid+profile+email+offline_access&state=[redacted]
And the below error:
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.Was actually able to fix this by running
Install\ Certificates.commandfrom python directory.
Despite 'successfully' installing, it looks like I'm unable to actually successfully use it. Similar issues to some above.

I still get this error also after installing the certificates.
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1020)>.
Error code explanation: 500 - Server got itself in trouble.
I am getting a screen full of these w/0.7.0:
โevent โ
โBackgroundEvent(BackgroundEventEvent { message: "stream error: stream disconnected before completion: stream closed before response.completed; โ
โretrying 1/10 in 208msโฆ" }) โ
โ โ
โevent โ
โBackgroundEvent(BackgroundEventEvent { message: "stream error: stream disconnected before completion: stream closed before response.completed; โ
โretrying 2/10 in 248msโฆ" }) โ
โ โ
โevent โ
โBackgroundEvent(BackgroundEventEvent { message: "stream error: stream disconnected before completion: stream closed before response.completed; โ
โretrying 3/10 in 339msโฆ" }) โ
โ
I have a paid Pro account.
Iโm encountering this error after completing the authorization and granting the app access to my API key. I have a team subscription and installed the CLI using brew
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.
codex login, page opens, login with google, input 2fa code, click into final step with defaults, and get these errors
- installed with homebrew
- Pro membership
- viable API key
Terminal Output:
โโ[$]> codex login
Starting local login server on http://localhost:1455
If your browser did not open, navigate to this URL to authenticate:
https://auth.openai.com/oauth/authorize?response_type=code&client_id=app_EMoamEEZ73f0CkXaXp7hrann&redirect_uri=http%3A%2F%2Flocalhost%3A1455%2Fauth%2Fcallback&scope=openid+profile+email+offline_access&code_challenge=Y5aLjGmeIONHScp7kiYQWnQfLK033DJvpxRap81miRI&code_challenge_method=S256&id_token_add_organizations=true&state=c32bd82f4f8e16b94c30ed03c8175b42f922ba2255f84d51e09fa9ed689c0cd8
Error logging in: login_with_chatgpt subprocess failed:
Error on webpage:
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.
Plus User, trying to log in from an Ubuntu server that I am ssh'ed into.
When i do codex login, it generates a URL that I then put into my dev pcs browser (not the server). Then I go through the authentication process.
After logging in it seems to want me to link with my API account, but I want to use the Plus account not my API key. Regardless, if I move forward with the API account, it errors out. If I try a new account I get this
If I try my existing account I get this
Goal is to login from my server (since thats where I will be running codex) and to use my Plus account not my API key.
same for me
Plus subscriber. But Codex still wants to use additional paid API calls.
So if you have a Pro account, is the CLI suppose to use that instead of an API organization/project and balance?
Iโve had no luck just using my Pro account. I get redirect to pick my organization and project on new sign-ins.
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.
It's trying to hit a localhost url
http://localhost:1455/auth/callback
Yep, plus user, can't log in via codex login, gets to a "Codex CLI wants access to your API organization" page, click Continue, get localhost response
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.
I'm using Google OAuth to authenticate, my subscription is via Google Play
It would be nice to get some guidance on whether Teams accounts are eligible or not.
Route Error (400 ): {
"error": {
"message": "No eligible ChatGPT workspaces found.",
"type": "invalid_request_error",
"param": null,
"code": "chatgpt_account_missing"
}
}
I am also a Teams-User. The Readme says
If you have a paid OpenAI account, run the following to start the login process:
but logging in returns an authentication error
"message": "No eligible ChatGPT workspaces found."
codex login is starting a local login server on a headless server without a browser.
curl http://localhost:1455/auth/callback?code=.. gives:
Error logging in: login_with_chatgpt subprocess failed:
Error response
Error code: 400
Message: State parameter mismatch.
Error code explanation: 400 - Bad request syntax or unsupported method.
There should be a prompt to paste a token.
Is this P0 being worked on? Is this an internal only effort, or are public contributions allowed?
This flow is broken. Running codex login doesn't use my ChatGPT Plus Account. It seems to connect to my API account and that too doesn't work and shows this error message.
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)>.
Error code explanation: 500 - Server got itself in trouble.
Does it used to work and broke recently? If yes, I can take a look and see what's going wrong.
Replying to my previous message, after running /Applications/Python 3.x/Install Certificates.command, the SSL error is gone. Now it says that I need to wait 7 days to redeem credits. So just need to wait for 7 more days to use codex CLI.
Sorry, your subscription must be active for more than 7 days to redeem credits.
Successfully logged in
This flow is broken. Running
codex logindoesn't use my ChatGPT Plus Account. It seems to connect to my API account and that too doesn't work and shows this error message.Error response Error code: 500 Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)>. Error code explanation: 500 - Server got itself in trouble.Does it used to work and broke recently? If yes, I can take a look and see what's going wrong.
When trying to login with CLI as a Plus user I get below error, what could be the issue? Codex works well without any problem from Web
โ Insufficient quota: You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs:
https://platform.openai.com/docs/guides/error-codes/api-errors. Manage or purchase credits at https://platform.openai.com/account/billing.
Yep, plus user, can't log in via
codex login, gets to a "Codex CLI wants access to your API organization" page, click Continue, get localhost responseError response Error code: 500 Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>. Error code explanation: 500 - Server got itself in trouble.I'm using Google OAuth to authenticate, my subscription is via Google Play
Okay! For me this was a Mac specific Python 3 issue where Python wasn't finding the certificate authority (CA) bundle. If you're using Homebrew Python, then:
brew update && brew upgrade && brew reinstall pythonThat builds Python against the latest OpenSSL and links to the correct CA certs.
Other Python installs (e.g. from python.org, pyenv) will need different fixes, but the underlying issue is likely the same: Python can't find valid certificates so HTTPS fails
Am I right in thinking the Python version is being rebuilt in Rust, so this particular issue will go away?
And now it wants me to verify my "organisation" on a personal account, using biometrics processed by a third party. No thank you. I think I am going to wait for a while, tihs is a cool concept, and I look forward to trying it out, but it's not at the UX feedback stage for ChatGPT users yet
I was faced with this issue
Error response
Error code: 500Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1010)>.
Error code explanation: 500 - Server got itself in trouble.
I ran /Applications/Python 3.<yourโversion>/Install\ Certificates.command on my terminal and it solved my issue :)
I am a Plus subscriber and I get
Credit redemption request failed: HTTP Error 400: Bad Request
Successfully logged in
What could be the reason? Thank you in advance
Plus user accessing a cloud Ubuntu server via SSH on Windows. Plus user, so running :codex login: and I get a link, Open it in my Windows browser, authenticate, and it tries to send the token to localhost.. What we have here...is a failure to communicate.
Others return the token in the browser and you paste it into the CLI, and away you go. I'm just sitting going nowhere with a "xdg-open: no method available for opening " message.
@jimCresswell I'm in the same situation. I shouldn't have to verify my organization by providing a government ID with photo to a third-party especially since I'm just looking to try this out right now. I wanted to comment so you know you're not alone in that feeling. I've found and am monitoring several other related issues on the repo here that having growing comments sharing they're running into this issue. With that I think this is just a snag in the auth flow and logic right now so my guess is it will get sorted out as the tool progresses and matures.
This is bizarre. As a small business owner I have to upload my ID to Persona instead of just providing certificate of registration/company details. I guess no codex for us then :/
Hi all, thanks for continuing to post examples on this thread. Admittedly, things like auth and billing are sensitive pieces of the system, so we have to get them right and they can only reasonably get done by folks working on our side. I am not at liberty to share specifics, but this has been flagged as a hi-pri issue for Codex CLI internally and there are folks working it.
I'm excited to share more when I can. In the meantime, if you are an API user, for sure using a valid OPENAI_API_KEY environment variable to authenticate is the most reliable option. For those of you using that solution, FYI, you can store the value in $CODEX_HOME/.env or $(pwd)/.env now:
codex loginis starting a local login server on a headless server without a browser.
curl http://localhost:1455/auth/callback?code=..gives:Error logging in: login_with_chatgpt subprocess failed:
Error response Error code: 400 Message: State parameter mismatch. Error code explanation: 400 - Bad request syntax or unsupported method.There should be a prompt to paste a token.
Is there a version/workaround that is working on a headless server? This is a CLI tool that requires a desktop/browser environment. Could you provide the steps if there are any?
@jimCresswell I'm in the same situation. I shouldn't have to verify my organization by providing a government ID with photo to a third-party especially since I'm just looking to try this out right now. I wanted to comment so you know you're not alone in that feeling. I've found and am monitoring several other related issues on the repo here that having growing comments sharing they're running into this issue. With that I think this is just a snag in the auth flow and logic right now so my guess is it will get sorted out as the tool progresses and matures.
@clarkio thank you for the solidarity!
Hi all, thanks for continuing to post examples on this thread. Admittedly, things like auth and billing are sensitive pieces of the system, so we have to get them right and they can only reasonably get done by folks working on our side. I am not at liberty to share specifics, but this has been flagged as a hi-pri issue for Codex CLI internally and there are folks working it.
I'm excited to share more when I can. In the meantime, if you are an API user, for sure using a valid
OPENAI_API_KEYenvironment variable to authenticate is the most reliable option. For those of you using that solution, FYI, you can store the value in$CODEX_HOME/.envor$(pwd)/.envnow:
Thanks for the update @bolinfest !
I managed to login by port forwarding SSH. Now as Plus user I am getting:
BackgroundEvent(BackgroundEventEvent { message: "stream error: stream disconnected โ โbefore completion: You exceeded your current quota, please check your plan and โ โbilling details. For more information on this error, read the docs: โ โhttps://platform.openai.com/docs/guides/error-codes/api-errors.; retrying 1/10 in โ โ203msโฆ" })
with o3
โBackgroundEvent(BackgroundEventEvent { message: "stream error: stream disconnectedโโ โbefore completion: Your organization must be verified to use the model o3. โโ โPlease go to: https://platform.openai.com/settings/organization/general and click โโ โon Verify Organization. If you just verified, it can take up to 15 minutes for โโ โaccess to propagate.; retrying 1/10 in 207msโฆ" })
When Logging in with plus account:
โฏ Sign in with ChatGPT
Paste an API key (or set as OPENAI_API_KEY)
TypeError: fetch failed
at node:internal/deps/undici/undici:13510:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async vbe (file:///******/AppData/Roaming/npm/node_modules/@openai/codex/dist/cli.js:795:5693)
at async Server.<anonymous> (file://******/AppData/Roaming/npm/node_modules/@openai/codex/dist/cli.js:989:854) {
[cause]: Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:518:28)
at T0.emit (file:///C:/******/AppData/Roaming/npm/node_modules/@openai/codex/dist/cli.js:332:3119)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at ssl.onhandshakedone (node:_tls_wrap:864:12) {
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}
}
When I try to login I get this error:
Route Error (400 ): {
"error": {
"message": "No eligible ChatGPT workspaces found.",
"type": "invalid_request_error",
"param": null,
"code": "chatgpt_account_missing"
}
}
The error I encountered when following the instruction in README.MD:
codex login
Starting local login server on http://localhost:1455
If your browser did not open, navigate to this URL to authenticate:
https://auth.openai.com/oauth/authorize?response_type=code&client_id=app_...
Credit redemption request failed: HTTP Error 400: Bad Request
Successfully logged inWhen I'm checking the login status:
โ ~ codex login status
error: unexpected argument 'status' found
Usage: codex-aarch64-apple-darwin login [OPTIONS]
For more information, try '--help'.version:
โ ~ codex --version
codex-cli 0.10.0When i try using the login command i just get a prompt for an api key:
**codex login status
Missing OpenAI API key.
Set the environment variable OPENAI_API_KEY and re-run this command.**
I get this error on my Pro account:
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)>.
Unfortunately login feature just encapsulates API key creation using your ChatGPT account. This becomes obvious if you look at the description of #1212
- The codex multitool now has a login subcommand, so you can run codex login, which should write CODEX_HOME/auth.json if you complete the flow successfully. The TUI will now read the OPENAI_API_KEY from auth.json.
- The TUI should refresh the token if it has expired and the necessary information is in auth.json.
- There is a LoginScreen in the TUI that tells you to run codex login if both (1) your model provider expects to use OPENAI_API_KEY as its env var, and (2) OPENAI_API_KEY is not set.
But current version of README.MD states that rather unclearly for some reason.
Trying to codex login with my ChatGPT credentials results in the website asking me to link to an API-level organization.
I was hoping to avoid that and use my ChatGPT subscription instead, similar to how Claude can be signed into using a "normal" Claude subscription. Is that not possible with Codex? With Claude, using a normal subscription is much more economical than using an API key. Was hoping the same might be true here.
Oh, also: I'm trying to do codex login on a headless dev box, and the auth flow tries to redirect to localhost:1455 which obviously doesn't work. Is this also not possible?
Looks like I'm going be sticking with Claude for a while longer yet. Was hoping to compare it to GPT-5.
Oh, also: I'm trying to do
codex loginon a headless dev box, and the auth flow tries to redirect tolocalhost:1455which obviously doesn't work. Is this also not possible?Looks like I'm going be sticking with Claude for a while longer yet. Was hoping to compare it to GPT-5.
You can auth on your laptop, then copy the auth to your server.
(i.e scp /.codex/auth.json youruser@192.1.2.3:/.codex/auth.json)
@aivajoe please try 0.16.0 or later: today was a big release
I hear you on the problems with using it on a headless box. We're moving a bunch of things around in the docs right now, but the current workaround is to copy/scp ~/.codex/auth.json from your local machine (assuming you successfully got through the login flow locally) to the headless box where you want to use the CLI.
I logged in via my pro account but I can still see that API credits were being deducted from my API account. FYI this is my first time installing codex on the machine I am working on. I am using windows 11
@siddhantparadox For now, you need to explicitly unset OPENAI_API_KEY when running codex, so consider OPENAI_API_KEY= codex
Route Error (400 ): {
"error": {
"message": "No eligible ChatGPT workspaces found.",
"type": "invalid_request_error",
"param": null,
"code": "chatgpt_account_missing"
}
}
Should login by chatGPT account for teams, work? I see contradictory information.
- "Who can use the new sign-in flow?
Free, Plus, and Pro ChatGPT accounts.
Enterprise, Edu, and Team workspaces are excluded for now." -> https://help.openai.com/en/articles/11381614-codex-cli-and-sign-in-with-chatgpt
but
- "After you run codex select Sign in with ChatGPT. You'll need a Plus, Pro, or Team ChatGPT account, and will get access to our latest models, including gpt-5, at no extra cost to your plan." -> https://github.com/openai/codex
Which is then?
Oh, also: I'm trying to do
codex loginon a headless dev box, and the auth flow tries to redirect tolocalhost:1455which obviously doesn't work. Is this also not possible?Looks like I'm going be sticking with Claude for a while longer yet. Was hoping to compare it to GPT-5.
Having the same issue smh -_-
UPDATE: same error still occurring on v0.19.0 as well.
codex v0.16.0, attempting to authorize a Team account, also seeing the "No eligible ChatGPT workspaces found" 400 error:
Route Error (400 ): {
"error": {
"message": "No eligible ChatGPT workspaces found.",
"type": "invalid_request_error",
"param": null,
"code": "chatgpt_account_missing"
}
}
Same here with a team account. Oh boy, the impatience when something gets released but doesn't work directly. ๐
MacOS 15.6
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>.
Error code explanation: 500 - Server got itself in trouble.
In Firefox, Chrome, and Safari.
@aivajoe please try 0.16.0 or later: today was a big release
I hear you on the problems with using it on a headless box. We're moving a bunch of things around in the docs right now, but the current workaround is to copy/
scp~/.codex/auth.jsonfrom your local machine (assuming you successfully got through the login flow locally) to the headless box where you want to use the CLI.
Thank you @bolinfest, this worked for me!
@siddhantparadox For now, you need to explicitly unset
OPENAI_API_KEYwhen runningcodex, so considerOPENAI_API_KEY= codex
Can you elaborate on how to do it? I'm having the same problems with the plus account type, it's saying I have an insufficient quota. I have max spending set to 0, and I should be able to use it with a plus account right?
I run codex login and it gives me this:
The model "codex-mini-latest" does not appear in the list of models available to your account. Double-check the spelling (use
openai models list
to see the full list) or choose another model with the --model flag.
I run codex --help and it says that I should actually be using --login instead of login:
I run codex --login I get:

no api key is in env
i do codex login - it goes to openai , sign in , accept.
back in terminal it says logged in but looks like codex crashed.
launch codex again, looks like working
but i enter any simple prompt, like hi. and it says
๐ stream disconnected before completion: stream closed before response.completed
tried login several times, not working
chatgpt plus user
Things are getting quite weird on my end.
The login was successful, when I am under user's home directory, its working fine, but when I go into any specific project directory, it keeps complaining "Incorrect API key provided"
Edit: I have never created such api key so I am really confused as to whats going on here
New installation with npm install -g @openai/codex.
Tried codex login using my ChatGPT Plus account, but encountered the following error message on terminal after successful login in browser:
Error logging in: login_with_chatgpt subprocess failed:
Both MacOS and Ubuntu have the same issue.
Login plus user and: system
โ Insufficient quota: You exceeded your current quota, please check your plan and billing details. For more
information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors. Manage or
purchase credits at https://platform.openai.com/account/billing.
I was able to authenticate a team account via codex login, but then it selects the free plan, and not my team workspace...
Same issue with dvaldivia
I'm getting
No eligible ChatGPT workspaces found.
I also have a team account through my employer and getting this error while trying to login:
Route Error (400 ): {
"error": {
"message": "No eligible ChatGPT workspaces found.",
"type": "invalid_request_error",
"param": null,
"code": "chatgpt_account_missing"
}
}
I also have a team account through my employer and getting this error while trying to login:
Route Error (400 ): { "error": { "message": "No eligible ChatGPT workspaces found.", "type": "invalid_request_error", "param": null, "code": "chatgpt_account_missing" } }
I should mention that I have MFA enabled and can login to regular ChatGPT on Chrome just fine with the team account but the login fails with the above error when trying to login to codex CLI.
I have ChatGPT Pro and I also cannot login (neither codex normal flow and codex login worked), I use MFA.
โ ~ codex login
Starting local login server on http://localhost:1455
. If your browser did not open, navigate to this URL to authenticate:
https://auth.openai.com/oauth/authorize?response_type=code&client_id=xx&redirect_uri=http%3A%2F%2Flocalhost%3A1455%2Fauth%2Fcallback&scope=openid+profile+email+offline_access&code_challenge=xx&code_challenge_method=S256&id_token_add_organizations=true&codex_cli_simplified_flow=true&state=xx
Error logging in: login_with_chatgpt subprocess failed:
browser:
Error response
Error code: 500
Message: Token exchange failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>.
Error code explanation: 500 - Server got itself in trouble.
Tried re-install with cache flush and it didn't help.
Team user here
Route Error (400 ): {
"error": {
"message": "No eligible ChatGPT workspaces found.",
"type": "invalid_request_error",
"param": null,
"code": "chatgpt_account_missing"
}
}
is this somthing i need to ask my company to create?
It basically routes to OpenAI when want to use chat and it can't find the team orgs there... not sure if this intentional or not but for certain is broken.




























