HTTP status code · RFC 9110, section 15.5.2
401 Unauthorized
401 Unauthorized means the request has no valid credentials: the client must authenticate (log in or send a token) first.
What 401 means
Despite the name, 401 is about authentication: who you are. The server should send a WWW-Authenticate header saying how to authenticate. Compare with 403, which means the server knows who you are and still says no.
Common causes
- A missing, expired or wrong API key or token.
- An expired session cookie.
- A
Bearertoken sent to the wrong environment (test key on production).
How to fix 401
- Check that the
Authorizationheader is sent and the token is current. - Refresh or re-create the token.
- Make sure proxies don't strip the
Authorizationheader.
How Uptenna treats 401
With the default expected status (200-399), a 401 counts as a failed check. Two failures in a row open an incident, and the alert says Got HTTP 401 (expected 2xx or 3xx). The first successful check resolves it and sends a recovery. Monitors don't send credentials, so for an endpoint that requires auth, set the expected status to 401: the check then confirms the server is answering and still protected. Or monitor a public health endpoint instead.
See Monitors for expected status codes, keywords and timeouts.
Frequently asked questions
What does HTTP 401 mean?
401 Unauthorized means the request has no valid credentials: the client must authenticate (log in or send a token) first.
Is 401 an error?
Yes, 401 is a client error: the server is saying something about the request needs to change.
Does an uptime monitor treat 401 as down?
By default, yes: Uptenna counts anything outside 200-399 as a failed check and opens an incident after two failures in a row. You can change the expected status per monitor.
Related status codes
Find out the moment your site returns 401
Uptime checks, cron job heartbeats and a public status page, with an alert when something breaks. Free: 5 monitors checked every 5 minutes and email alerts. Pro ($9/month): checks every minute, Slack, Discord, Telegram and webhooks, SSL expiry warnings.
- No card required
- Status page included
- Email alerts included