Loading...
Interactive RFC 9110 decision engine and dilemma resolver for REST API status codes (401 vs 403, 301 vs 308, 400 vs 422)
Clarify common ambiguous API design decisions
A user attempts to access an endpoint protected by security policies.
RFC 9110, Section 15.5.2
Authentication is required and has failed or has not been provided.
Missing, expired, or invalid API key or Bearer token.
When the user IS authenticated, but lacks sufficient permissions (use 403).
WWW-Authenticate: Bearer error="invalid_token"{
"error": "Unauthorized",
"message": "Bearer token expired or missing."
}