200-901 · Question #131
A 401 HTTP response code is returned when calling a REST API. What is the error state identified by this response code?
The correct answer is C. The request has not been accepted because it requires authentication. The correct answer is C. HTTP 401 'Unauthorized' means the request lacks valid authentication credentials. The client must authenticate (e.g., provide a valid token or credentials) before access is granted. It does not mean the client is recognized but lacks permission-that…
Question
A 401 HTTP response code is returned when calling a REST API. What is the error state identified by this response code?
Options
- AThe server cannot process the request as it has detected an issue in the request syntax or body.
- BThe server accepted the request but the client is not authorized for this content.
- CThe request has not been accepted because it requires authentication.
- DThe server cannot find the requested resource because the path specified is incorrect.
How the community answered
(23 responses)- C96% (22)
- D4% (1)
Explanation
The correct answer is C. HTTP 401 'Unauthorized' means the request lacks valid authentication credentials. The client must authenticate (e.g., provide a valid token or credentials) before access is granted. It does not mean the client is recognized but lacks permission-that would be 403 Forbidden (answer B). Answer A describes a 400 Bad Request error. Answer D describes a 404 Not Found error. The subtle but important distinction: 401 = not authenticated yet; 403 = authenticated but not authorized.
Topics
Community Discussion
No community discussion yet for this question.