Unauthorized
HTTP 401 Unauthorized is a Client errors (4xx) status code. Authentication is required and has failed or has not been provided.
What 401 means
Authentication is required and has failed or has not been provided.
Despite the name it means "unauthenticated". Send valid credentials (e.g. a token or the WWW-Authenticate scheme) and retry.
Client errors (4xx)
The request contains an error from the client — bad syntax, missing auth or a wrong URL.
Other 4xx codes
FAQ — 401
What does HTTP 401 mean?
401 Unauthorized: Authentication is required and has failed or has not been provided. Despite the name it means "unauthenticated". Send valid credentials (e.g. a token or the WWW-Authenticate scheme) and retry.
Which class does status code 401 belong to?
401 is a Client errors (4xx) code. The request contains an error from the client — bad syntax, missing auth or a wrong URL.
Where is the 401 code defined?
Status code 401 is defined in RFC 9110 and is part of the IANA HTTP Status Code Registry.