The DevOps Drop
Home / Encyclopedia / HTTP Status Codes / 4xx Client Error Responses / 401 Unauthorized

401 Unauthorized

The HTTP 401 Unauthorized status code indicates that authentication is required or has failed. Learn how authentication errors happen and how to troubleshoot them.

Published 16 Jul 2026 · HTTP Status Code

What is HTTP 401 Unauthorized?

The 401 Unauthorized response indicates that a client must authenticate before accessing the requested resource.

Despite the name, the issue is usually missing or invalid authentication rather than permissions.

Common Causes

  • Missing authentication token
  • Expired JWT tokens
  • Invalid API keys
  • Incorrect credentials

Example

HTTP/1.1 401 Unauthorized

DevOps Considerations

401 responses commonly appear when debugging APIs, identity providers, and authentication middleware.

Summary

401 Unauthorized means the client must provide valid authentication details.