HTTP 401 Unauthorized — Meaning

401 Unauthorized means authentication is required or the credentials supplied are invalid; retry with proper credentials. Unlike 403, it implies access is possible once authenticated.

Open the interactive DevRef Hub tool →

Key facts

Status code401
Class4xx Client error
Key headerWWW-Authenticate: Bearer realm="api"
SpecRFC 9110 §15.5.2

Frequently asked questions

What does 401 mean?

Authentication is missing or invalid; supply valid credentials.

401 vs 403?

401 = not authenticated; 403 = authenticated but lacking permission.

Related pages

HTTP 401 Unauthorized is part of DevRef Hub on GOAT Lab — a free reference you can use without signing up, and it works offline. Open the tool above for any custom value.

Advertise

Part of GOAT Lab — 26 free, browser-based science, engineering and developer tools. No sign-up.