ChatGPT/Codex 401 Unauthorized Error: Why It Happened and What to Do Now

If you opened ChatGPT or Codex on September 25, 2026, and suddenly saw “401 Unauthorized” or “Incorrect API key provided,” you were definitely not alone.

Thousands of users reported problems with OpenAI services, while Codex users in particular started seeing authentication errors that appeared to suggest their API keys were broken.

But there was an important twist:

The error did not necessarily mean your API key was wrong.

OpenAI confirmed that Codex was experiencing elevated errors and began working on a fix. The service was later restored.

So if you ran into the 401 error during the September 25 incident, you probably did not need to delete your account, create a new API key, or start changing random settings.

Here’s what happened, what the 401 error actually means, and what you should do if Codex is still refusing to work.

What Does the ChatGPT/Codex 401 Unauthorized Error Mean?

The error many users saw looked like this:

“Unexpected status 401 Unauthorized: Incorrect API key provided”

Normally, a 401 error means that a service could not authenticate a request.

That can happen when:

  • An API key is incorrect
  • An API key has expired or been revoked
  • A login session has expired
  • A service cannot verify your credentials
  • Your account does not have permission to access something

So naturally, seeing the words “Incorrect API key” makes people think:

“Wait… did my API key just break?”

But the September 25 Codex incident was more complicated.

A number of users said they were accessing Codex through their ChatGPT subscription and authentication, rather than manually entering an OpenAI API key.

Yet they were still getting the same 401 message.

Reddit users reported the problem across different setups, while several Codex-related GitHub reports described similar authentication failures. One report even indicated that the same ChatGPT OAuth authentication could still work in a direct test while Codex requests were failing.

That strongly suggests the message should not automatically be interpreted as “your API key is wrong.”


Was ChatGPT Down?

There was a real OpenAI service disruption on September 25, 2026.

User reports surged on outage-tracking services, with thousands of reports appearing during the incident. OpenAI’s status information also indicated elevated errors affecting Codex and that engineers were working on mitigation.

The services were later restored.

That distinction matters.

If you saw the 401 message during the September 25 incident and everything is working normally now, you probably do not need to keep troubleshooting your account.

The problem may simply have been on OpenAI’s side.


Why Did Codex Say My API Key Was Incorrect?

This was probably the most confusing part of the whole incident.

Some users weren’t even using a manually configured API key.

They were simply:

ChatGPT → Codex → Login with ChatGPT

And suddenly Codex responded with:

401 Unauthorized — Incorrect API key provided

Users reported trying things like:

  • Logging out
  • Logging back in
  • Restarting Codex
  • Restarting their computer
  • Trying another device
  • Checking environment variables

For some users, none of that helped.

GitHub reports around the same time also showed authentication problems affecting Codex CLI and Codex Desktop, including Windows users.

That’s why this incident is a good reminder:

An authentication error doesn’t always mean the credentials belong to you and are actually wrong.

Sometimes the authentication request can fail somewhere between the client and the service.


Did OpenAI Confirm the Codex Outage?

Yes.

OpenAI’s service-status information identified problems affecting Codex, including elevated errors, and indicated that engineers were working on mitigation.

That matters because it gives users an important piece of context.

When thousands of people suddenly report the same authentication error at roughly the same time, it becomes much less likely that everyone independently typed the wrong API key.

The public reports from Reddit and GitHub showed a similar pattern, with users in different environments describing essentially the same problem.


What Happened to Codex on September 25?

The incident unfolded fairly quickly.

1. Users Suddenly Started Getting 401 Errors

Codex users began reporting messages such as:

“Unexpected status 401 Unauthorized”

and:

“Incorrect API key provided.”

The reports appeared across online communities, including Reddit and GitHub.

Some users said the error appeared in the middle of work rather than immediately after changing a setting.

2. The Problem Wasn’t Limited to One Computer

Reports came from different environments, including:

  • Codex CLI
  • Codex Desktop
  • Windows
  • Different accounts
  • Different machines
  • ChatGPT-based authentication

That made a simple local configuration mistake less convincing as a universal explanation.

3. OpenAI Acknowledged the Service Problem

OpenAI’s status information showed that Codex was experiencing elevated errors and that mitigation was underway.

4. The Service Recovered

The problem was later resolved, although OpenAI did not publicly provide a detailed technical explanation of the underlying root cause.

That’s an important distinction:

We know the service experienced an incident. We don’t have a complete public explanation of exactly what caused the authentication failures.


Should You Change Your OpenAI API Key?

If you only started seeing the 401 error during the September 25 incident, don’t immediately assume you need a new API key.

This is especially important if you normally use:

ChatGPT → Codex

rather than:

OpenAI API → Your own API key → API request

Those are not necessarily the same authentication path.

If you never manually configured an API key, seeing the phrase “Incorrect API key” does not automatically mean you have an invalid key sitting somewhere on your computer.

In other words:

Don’t rotate credentials just because an outage temporarily displayed an API-key-related error.


What Should You Do If Codex Still Shows 401?

If you’re still seeing the error now, the situation is slightly different.

The September 25 incident may have been resolved, so it’s worth checking your own setup.

Step 1: Check OpenAI’s Service Status

Before changing anything, check whether OpenAI is reporting an active incident.

If Codex is currently experiencing elevated errors, there’s little value in repeatedly changing your local configuration.

Wait for the service to recover first.

Step 2: Log Out and Sign Back In

If OpenAI’s services appear operational but Codex is still failing:

  1. Log out of ChatGPT.
  2. Completely close Codex or the ChatGPT desktop application.
  3. Restart the application.
  4. Sign in again.

This can eliminate a stale authentication session.

It isn’t guaranteed to fix the problem, but it’s a relatively simple thing to try.

Step 3: Check Whether You Actually Have an API Key Configured

If you’re using Codex CLI or another developer setup, check whether your environment contains credentials such as:

  • OPENAI_API_KEY
  • CODEX_API_KEY
  • Custom authentication settings
  • Custom API endpoints
  • Third-party providers

This is particularly important for developers who have customized their local environment.

At the same time, don’t assume the presence of a 401 automatically means those credentials are the problem.

During the September 25 incident, some users reported receiving the error even though they had not manually configured those environment variables.


Can Logging Out and Back In Fix the Problem?

Sometimes. But it wasn’t a universal fix during the September 25 outage.

Some users reported that they completely logged out, restarted the application, and signed back in—only to receive the same 401 error.

That’s another clue that the incident wasn’t simply caused by expired login sessions.

If thousands of users are experiencing the same problem simultaneously, there’s a good chance that repeatedly restarting your computer isn’t going to magically fix it.


What If You Were Working on Codex When It Went Down?

This is where things get more stressful.

Imagine Codex is in the middle of a coding task when suddenly:

401 Unauthorized

appears.

Your first thought might be:

“Did I just lose everything?”

Not necessarily.

Before doing anything drastic, check your project itself.

Look at:

  • Your Git working tree
  • Recent file changes
  • Uncommitted changes
  • Recent commits
  • Generated files
  • The terminal output from the last successful Codex action

A service authentication failure doesn’t automatically mean your local project has been damaged.

Some Reddit users reported that ongoing work was interrupted during the incident, while others discussed concerns about usage and task execution. Those are individual user reports, however, and shouldn’t be treated as proof that every Codex account experienced the same behavior.


Does a 401 Error Mean Your ChatGPT Account Was Banned?

No.

A 401 status code by itself does not prove that your ChatGPT account has been banned.

It simply means that a particular request failed the authentication required by the service.

A 401 error alone cannot tell you that:

  • Your ChatGPT account was banned
  • Your subscription was canceled
  • Your API key was permanently revoked
  • You violated OpenAI’s policies

The September 25 incident is a good example of why.

A large number of users encountered similar authentication errors at roughly the same time, and OpenAI confirmed a Codex service incident.

So if you saw a 401 during that window, don’t immediately jump to the conclusion that something is wrong with your account.


Why Did So Many People Think Their API Key Was Broken?

Because the error message literally said so.

That’s the frustrating part.

When software tells you:

Incorrect API key provided

most people aren’t going to think:

“Interesting. Perhaps the authentication service itself is experiencing an internal problem.”

They’re going to think:

“I need a new API key.”

But authentication is a chain.

Your request can involve:

Your device → Codex client → Authentication → OpenAI services → Backend

A failure anywhere along that path can potentially produce an authentication-related error.

That means the error message alone doesn’t necessarily tell you where the failure occurred.

This was especially confusing during the September 25 incident because some public reports indicated that ChatGPT authentication could still work in certain tests while Codex requests were failing.


ChatGPT 401 vs. Codex 401: What’s the Difference?

The same HTTP status code can appear in very different situations.

SituationWhat it could mean
Only your API request failsPossible API key or configuration problem
Codex suddenly fails across multiple requestsPossible Codex service issue
Thousands of users report the same 401Service-side problem becomes more likely
ChatGPT is also experiencing problemsPotentially broader OpenAI service disruption
OpenAI reports an active incidentCheck the official status before changing settings
Logging back in doesn’t helpThe issue may not be your login session

The key word here is “could.”

A 401 doesn’t automatically identify the root cause.

You need to look at the broader situation.


Is Codex Working Again?

The September 25 incident was subsequently reported as resolved.

So if you experienced the problem during the outage but Codex is working normally now, there is generally no reason to keep changing your credentials simply because you remember seeing the 401 message.

However, if your Codex is still showing 401 today, that’s worth investigating separately.

At that point, check:

  1. OpenAI’s current service status
  2. Your ChatGPT login session
  3. Your Codex version
  4. OPENAI_API_KEY
  5. CODEX_API_KEY
  6. Custom authentication settings
  7. Custom API endpoints
  8. Whether the problem happens on another device

If everyone else appears to be working normally but your installation continues to fail, the problem may be specific to your local setup.


The Bottom Line

The “401 Unauthorized: Incorrect API key provided” error that appeared around ChatGPT and Codex on September 25, 2026 was not simply a story of thousands of users suddenly entering the wrong API key.

OpenAI confirmed that Codex was experiencing elevated errors and worked to mitigate the incident. Users across Reddit and GitHub reported similar authentication failures, including cases where they were using ChatGPT-based authentication rather than manually entering an API key.

So if you saw the error during that incident:

Don’t panic, and don’t immediately rotate your API key.

If everything is working again, you’re probably done.

If Codex is still returning 401 errors, that’s when it’s worth checking your local authentication, environment variables, client version, and login session.

September 25 Incident at a Glance

  • Date: September 25, 2026
  • Main error: 401 Unauthorized
  • Common message: Incorrect API key provided
  • Main service affected: Codex
  • Were users reporting the issue publicly? Yes
  • Did OpenAI acknowledge a service incident? Yes
  • Does the error automatically mean your API key is bad? No
  • Does a 401 automatically mean your ChatGPT account was banned? No
  • Was the incident later resolved? Yes
  • Has OpenAI publicly explained the complete root cause? Not in detail

The biggest takeaway is simple:

A scary-looking 401 error doesn’t always mean your credentials are broken. Sometimes the service on the other side of the login is the thing having a bad day.

發佈留言