Cannot sign in with ChatGPT - no_valid_organizations
What version of Codex is running?
0.1.2505172129
Which model were you using?
none
What platform is your computer?
Darwin 24.5.0 arm64 arm
What steps can reproduce the bug?
Run codex --login, then select Sign in with ChatGPT. When the browser pops up, sign into ChatGPT account, then click Continue.
What is the expected behavior?
Presumably, I would expect it to sign me in with codex-CLI.
What do you see instead?
I see the following in the browser:
Oops, an error occurred!
Route Error (400 ): {
"error": {
"message": "You do not have any valid organizations.",
"type": "invalid_request_error",
"param": null,
"code": "no_valid_organizations"
}
}
Additional information
Not sure what's happening. My ChatGPT account has been on Plus for about a month, and I upgraded to Pro a couple of days ago. I have a single organization ("Personal"), and it is Verified. Under Billing, I have auto-recharge turned off, and I do have a payment method entered. My current balance is $0.91 (lol), but it's been reloaded multiple times before now.
The codex app just continues to show the "Waiting for authentication" message -
( ● ) Waiting for authentication… ctrl + c to quit
17 Comments
I found out what the problem was. I had been looking for a few days to find out why I couldn't use other providers. The reason is that I didn't know how to distinguish and separate the OpenAI API platform from the rest. For example, when I entered
codex --provider openrouter,a formula from auth.json from openai popped up and then I had valid-organizations - so in your case, you may have mixed up config.json if this happens with codex --login alone (delete auth.json and config.json from .codex config folder)
I'm just about to work on this problem
Hello! My config.json is pretty empty:
I tried deleting it, as you mentioned, and trying to login again, but I see the same error. Note that the error is showing up on the web site right after login and clicking "continue" to connect, rather than in the cli app.
Getting this as well now. I think there seems to be issues with users who have had an API billing account already setup for quite some time.
Also having this issue
I am also having this issue.
Also the exact same issue
Same issue
Same here
Same here. I'm paying Pro, have been for over 2 months, can someone please take this seriously?
I reported it with the support bot at openai.com, and after a few back and forths, it suggested keeping an eye on the issue here. 😂 So, hopefully the right people are here who can fix this!
same here. Can codex fix its bug? 😆
Same issue here, I reported it.. I can't access codex on web either.. so along with this --login issue I also get these.
<img width="400" alt="Image" src="https://github.com/user-attachments/assets/7949fa36-fbcf-4f67-aa02-4917f8e5f6ad" />
<img width="400" alt="Image" src="https://github.com/user-attachments/assets/770abcf5-d480-4ec9-a286-34cfe129c622" />
<img width="400" alt="Image" src="https://github.com/user-attachments/assets/236f901a-c675-42c9-bb2d-2d7dfd6cd1af" />
<img width="400" alt="Image" src="https://github.com/user-attachments/assets/431de2d6-dc2c-4b1e-b954-bb94af42332d" />
<img width="400" alt="Image" src="https://github.com/user-attachments/assets/bcd9cb7c-311e-4e93-b089-4e8d47ff89f4" />
also having this issue
!Image
FYI, I just tried this again today, and it's working now. If you're getting the 400 error with no_valid_organizations, give it another try! If a few of you can confirm it's working for you too, I'll close this issue...
@greinacker it works on the web browser but look at your terminal - do you still see 400? I do on both my Mac and Windows (WSL) devices.
No - it's all working on my side. It even added the API credits to my account, although I assume that's unrelated.
Bummer it's still giving you trouble. :(
https://github.com/openai/codex/pull/1118
I would like to suggest that you try my latest commit, as it resolved my issues with valid_orgs, though it did not fully address the matter of the --free flag.