API Design · Junior · Question 12 of 75
What's the difference between 401 Unauthorized and 403 Forbidden?
- 1They mean the same
- 2401: page not found; 403: server error
- ✓Correct answer: 401: missing or invalid credentials; 403: credentials are valid but the user isn't allowed to do this
Explanation
Despite its name, 401 is about authentication. Some APIs return 404 instead of 403 to avoid revealing that a resource exists.