Client error
HTTP 401: Unauthorized
HTTP 401 means authentication is required or failed.
Meaning
The client must authenticate before the server can return the protected resource.
Common causes
Missing credentials, expired tokens, invalid API keys, or failed login sessions can cause it.
What to check
Send valid credentials, refresh the token, or check the WWW-Authenticate response header.
Example response
HTTP/1.1 401 UnauthorizedReferences
- Registry
- IANA HTTP Status Code Registry
- Spec
- RFC 9110 §15.5.2
- Guide
- MDN 401 Unauthorized
Related HTTP status codes
Nearby codes often answer the next debugging question.