AI engineering glossary · Web APIs HTTP
What is 401 Unauthorized?
401 Unauthorized: The status code meaning the request lacks valid credentials, for example a missing or expired token or a wrong API key. Despite its name it concerns authentication, and the response may say how to authenticate.
401 Unauthorized: an example
Calling an API without an Authorization header returns 401.
Related terms
More Web APIs HTTP terms
- 403 Forbidden
- 404 Not Found
- 409 Conflict
- 422 Unprocessable Content
- 429 Too Many Requests
- 500 Internal Server Error
- 502 Bad Gateway
- 503 Service Unavailable
Where you learn it
401 Unauthorized is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.