401

Unauthorized

Description

Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. The 401 response should include a WWW-Authenticate header field containing a challenge applicable to the requested resource.

HTTP Status Codes Details

Status Code
401
Status Name
Unauthorized
Class
4xx
Common Usage
Yes

Common Scenarios

  • Client request errors
  • Authentication issues

Handling Recommendations

  • Validate client input
  • Provide clear error messages

Was this helpful?

Loading...

Send Feedback

Found an error or have a suggestion? We respond within 48 hours.

Fact-checking completed

Verified by: Pavel Volkov
Created:
Last updated:
Information verified against official sources

Official Sources

Internet Engineering Task Force RFCs

Official HTTP status codes specification (RFC 7231)

Internet standards organization defining HTTP protocols

Mozilla Developer Network

Comprehensive HTTP status codes documentation

Authoritative web development documentation

Internet Assigned Numbers Authority

Official HTTP status code registry

Internet protocol parameters authority