DevAtlas

Learn

  • Dashboard
  • Learning Paths
  • All Categories
  • Topics

Practice

  • Interview Questions
  • Flashcards
  • Quizzes
  • Study Plans

Personal

  • Bookmarks
  • Notes
  • Progress
  • PDF Library
  • Settings
  • About
  1. Interview Questions
  2. When should an API return 401 Unauthorized versus 403 Forbidden?
0%
ScenarioBeginnerSecurity

When should an API return 401 Unauthorized versus 403 Forbidden?

Follow-up questions

  • Why might an API return 404 instead of 403 for a resource the user cannot access?
  • What header accompanies a correct 401 response?

Related topics

HTTP Status CodesJWT (JSON Web Tokens)Access Tokens and Refresh Tokens
#auth#http-status#401#403#scenario