Bird
Raised Fist0

Which HTTP status code indicates unauthorized access to an API?

easy📝 Syntax Q3 of Q15
Rest API - Authentication and Authorization
Which HTTP status code indicates unauthorized access to an API?
A404
B200
C401
D500
Step-by-Step Solution
Solution:
  1. Step 1: Recall HTTP status codes related to security

    401 means unauthorized access, indicating missing or invalid credentials.
  2. Step 2: Compare with other codes

    200 means success, 404 means not found, 500 means server error, so only 401 fits.
  3. Final Answer:

    401 -> Option C
  4. Quick Check:

    Unauthorized access code = 401 [OK]
Quick Trick: 401 means unauthorized, not found is 404 [OK]
Common Mistakes:
MISTAKES
  • Confusing 401 with 404
  • Thinking 200 means unauthorized
  • Mixing server errors with security codes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes