HTTP 4xx

401 Unauthorized

Authentication is required and has failed or not been provided.

4xx Client errorCommonly seen

What causes it

  • A missing, expired, or invalid credential or token.

How to fix it

Provide valid credentials. Check that tokens have not expired and that the Authorization header is being sent.

Example response

A typical raw HTTP response a client receives for a 401, with the headers this code is defined around.

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer realm="api"
Content-Type: text/html; charset=utf-8

Know before your visitors do.

Sentinel checks your site around the clock from multiple regions and alerts you the moment it starts returning a 4xx error, so you can fix it before it costs you.