Node.js · Junior · Question 65 of 75
What is the difference between status codes 401 and 403?
- 1They mean the same thing
- 2401: the page is not found; 403: the server crashed
- ✓Correct answer: 401: the user is not authenticated; 403: the user is known but has no permission
Explanation
Send 401 when credentials are missing or invalid, and 403 when a logged-in user tries to access something they're not allowed to.