Question 960
An API response says 401 when the client fails to attach a required credential. What category of failure is it?
Explanation
Correct Answer
401 identifies failed or missing authentication. HTTP 401 concerns authentication; HTTP 403 instead indicates a request that is understood but forbidden.
Incorrect Answers
404 indicates that the requested resource could not be located; for an API call missing required authentication credentials, the relevant operation is recognizing an authentication requirement rather than a permissions issue, not recognizing a missing resource at the requested URI.
429 signals throttling and may include retry guidance; for an API call missing required authentication credentials, the relevant operation is recognizing an authentication requirement rather than a permissions issue, not recognizing temporary request throttling.
403 indicates the server refuses the requested action even when the caller is recognized; for an API call missing required authentication credentials, the relevant operation is recognizing an authentication requirement rather than a permissions issue, not recognizing authorization denial after authentication.