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:1028)>. Error code explanation: 500 - Server got itself in trouble.

Resolved 💬 13 comments Opened Aug 5, 2025 by kundeng Closed Nov 2, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

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:1028)>. Error code explanation: 500 - Server got itself in trouble.

Which model were you using?

_No response_

What platform is your computer?

_No response_

What steps can reproduce the bug?

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:1028)>.

Error code explanation: 500 - Server got itself in trouble.

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

13 Comments

farah · 11 months ago

Same issue.

<img width="1306" height="462" alt="Image" src="https://github.com/user-attachments/assets/dbb488a9-17dd-402b-a406-45794beb8c89" />

sedghi · 11 months ago

same here, can't login with my chatGPT

Whiteknight07 · 11 months ago

same here

pl728 · 11 months ago

#1951

nextagencyio · 11 months ago

same

zidinberu · 11 months ago

Same. Very bad :(

paolomax · 11 months ago

Same, very bad I paid for something I can't use...

j-sustr · 11 months ago

+1

adityasaravana · 11 months ago

+1

ktyubeshi · 11 months ago

https://github.com/openai/codex/issues/1951#issuecomment-3165404122

This method solved the problem. It seems that the cause was not a bug, but rather that the CA root certificates maintained by the execution environment were outdated.

nextagencyio · 11 months ago

that works thanks!

On Wed, Aug 13, 2025 at 11:08 AM ktyubeshi @.***> wrote:

ktyubeshi left a comment (openai/codex#1849) <https://github.com/openai/codex/issues/1849#issuecomment-3184531715> #1951 (comment) <https://github.com/openai/codex/issues/1951#issuecomment-3165404122> This method solved the problem. It seems that the cause was not a bug, but rather that the CA root certificates maintained by the execution environment were outdated. — Reply to this email directly, view it on GitHub <https://github.com/openai/codex/issues/1849#issuecomment-3184531715>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAIPTANAERZP5DYMWUWOPZL3NNPGPAVCNFSM6AAAAACDFGQ64CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOBUGUZTCNZRGU> . You are receiving this because you commented.Message ID: @.***>
j-sustr · 11 months ago

Solved by upgrading cerfifi on my macOS 15

python3 -m pip install --upgrade certifi
etraut-openai contributor · 8 months ago

I think this issue is no longer relevant. The CLI no longer relies on the local Python install.