← All status codes
401

Unauthorized

The server needs to know who you are, and the request either didn't say or said it wrong. Despite the name, 401 is about authentication (who you are), not authorization (what you're allowed to do). That's 403.

A 401 response should include a WWW-Authenticate header that names the scheme the server expects, for example Bearer or Basic. If you're not sure why you're getting a 401, that header is the first thing to look at.

What we see on Larm

Failed HTTP checks on Larm from 9 October to 8 November 2026, across about 130 monitors.

Only one monitor got 401s, but it got 2,036 of them, with a median time to first byte of 978 ms. A long run of 401s on one monitor almost always means its credentials stopped working, not that the service is down.

COMMON CAUSES

The Authorization header is missing
The token or API key expired, was revoked, or was rotated
The scheme is wrong, for example Basic where the server expects Bearer
A key for one environment is sent to another, like a staging key against production

HOW TO FIX IT

Read the WWW-Authenticate header in the response to see what the server expects
Check that the token is still valid and hasn't expired
Check the header format, for example Authorization: Bearer <token>
If it started suddenly, check whether someone rotated the key

What this means for monitoring

If the endpoint needs authentication, add the header to the monitor. Larm HTTP monitors can send up to 20 custom headers. Use a key with read-only access and note when it expires. If you'd rather not store a key, monitor a public health endpoint instead, or add 401 to the monitor's expected status codes so it counts as up as long as the server answers.

Related status codes

4xx Client Error

400
Bad Request

The server can't process the request because something is wrong with it. Missing required fields, invalid JSON, wrong data types. Check your request body and query parameters.

403
Forbidden

The server understood the request and won't allow it. Unlike 401, sending the same credentials again won't help.

404
Not Found

The server can't find anything at this URL. The path is wrong, the resource was removed, or it was never there.

405
Method Not Allowed

The HTTP method isn't supported for this URL. You sent a DELETE to an endpoint that only accepts GET and POST. The response includes an Allow header listing valid methods.

408
Request Timeout

The server gave up waiting for the client to finish sending its request. It's the server saying the client was too slow, not the other way around.

409
Conflict

The request conflicts with the current state of the resource. Common with concurrent updates: two people editing the same record, or trying to create a resource that already exists.

410
Gone

The resource existed but has been permanently deleted. Unlike 404, this is deliberate: the server is saying "it was here, it's not anymore, and it's not coming back."

413
Content Too Large

The request body is larger than the server is willing to accept. Common when uploading files that exceed the server's size limit.

415
Unsupported Media Type

The server doesn't support the Content-Type of the request. You sent XML but the endpoint only accepts JSON, or you forgot the Content-Type header entirely.

422
Unprocessable Content

The request is well-formed but the content is invalid. The JSON is valid, but the data doesn't pass validation: missing required fields, values out of range, business rule violations.

429
Too Many Requests

The client sent too many requests in a given amount of time, and the server is asking it to slow down.

Get alerted when your endpoints return unexpected status codes.

Larm checks your HTTP endpoints from multiple global locations and alerts you when they return status codes outside your expected range.