DELAPARRA
Index
Color
NL
Category: HTTP status codes

401 Unauthorized

Explained by Updated

What is 401 Unauthorized?

401 Unauthorized: The request requires authentication. The client must identify itself. 401 Unauthorized means the request needs authentication and none was given, or the credentials were invalid. Despite the name, it is about who you are, not what you are allowed to do. Typical causes are a missing login session, an expired token or a wrong API key. The right reaction is to log in again or refresh the token. A front end often catches 401 globally and sends the user to the login page.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about 401 Unauthorized

What should you keep in mind with 401 Unauthorized?

Do not confuse it with 403. A 401 says "I don't know who you are", while 403 says "I know who you are, and you may not do this". Getting this right helps clients react correctly, and it helps you when reading logs. A spike in 401s points at login or token problems; a spike in 403s points at permissions.

At a glance

CategoryHTTP status codes
Explained by
Updated

More HTTP status codes terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.