LOGBOOK

HELP

Quiz Entry - updated: 2026.10.15

What is the difference between HTTP 401 Unauthorized and 403 Forbidden?

401 means the server doesn't know who you are (missing or invalid authentication); 403 means it knows who you are, but you are not allowed to do this.

Decision flow: not authenticated gives 401, not allowed gives 403, missing resource 404, invalid body 400, otherwise 200 or 201

* A typical order of checks behind the status code; servers differ in the details. *

401 Unauthorized 403 Forbidden
Problem Authentication: who are you? Authorisation: are you allowed?
Typical cause No token, expired token, wrong password Valid account, but lacking the role or permission
Fix Log in again or get a fresh token Use an account with the right rights

The name "Unauthorized" for 401 is a historical misnomer: it really means unauthenticated. With a controller API that uses tokens, a 401 halfway through a script usually means the token has expired.

Go deeper:

From Quiz: ITIA / Network Programmability: CLI, REST APIs, YANG, NETCONF and RESTCONF | Updated: Oct 15, 2026