System Design · Junior · Question 8 of 75

How do 401 and 403 responses differ?

Explanation

On 401, the client usually prompts the user to sign in or refreshes the token. On 403, signing in again won't help - show "access denied". 404 means the resource wasn't found (sometimes it's returned instead of 403 to avoid revealing that the resource exists).

Further reading

Problem with a question

System Design · Junior · question 8

Test yourself

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

Take this quiz