401 Unauthorized
Who the fuck are you?
What it properly means
Despite the name, this means unauthenticated: the client must authenticate itself to get the response.
- Class
- 4xx Client error: you fucked up
- Defined in
- RFC 9110, section 15.5.2
Get one yourself
This endpoint really answers with 401. Point your client at it and see what it does.
curl -i https://httpcodes.dev/api/401People mix this up with
-
Not logged in, or not allowed?
401 means the server doesn't know who you are: log in and try again. 403 means it knows exactly who you are and the answer is still no, so logging in again won't help.