401 Unauthorized

Explanation:

The 401 Unauthorized status code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.

Usage:

This status is used when authentication is required and has either failed or not been provided. The client should re-request with the required credentials.

Attentions:

  • 401 responses must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.
  • If the request already included authentication credentials, this response indicates that authorization has been refused for those credentials.

Sample:

undefined