SECTION 01 · 6 MIN READ & EXPLORE
Follow the request
Before learning the methods, watch the conversation between a client and a server.
DEMONSTRATION CONTENTAuthentication starts with a question: who is making this request? Authorization asks what that identity is allowed to do. Keep those two questions separate as you explore.
One request, a small conversation
A protected endpoint can respond to a request without credentials with 401 Unauthorized and a WWW-Authenticate header. That header describes an authentication challenge. A client can then retry with an Authorization header.
This diagram is a simplified challenge-response flow. Some clients send credentials immediately, and token-based systems often obtain their credentials through a separate exchange.
Inspect before guessing
When a request fails, record its status, challenge, and response body before changing your configuration. 401 commonly points toward missing or invalid authentication; 403 indicates the server refuses the request. Real systems can deliberately obscure details, so always consider the API’s documented behavior.
Before you move on
Explain what WWW-Authenticate communicates. Then explain why a valid identity does not automatically have permission to access every resource.
Take a moment to explain the idea in your own words.
