API Design · Junior · Question 12 of 75

What's the difference between 401 Unauthorized and 403 Forbidden?

Explanation

Despite its name, 401 is about authentication. Some APIs return 404 instead of 403 to avoid revealing that a resource exists.

Further reading

Problem with a question

API Design · Junior · question 12

Test yourself

Take the API Design · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz