What is the Authorization header?
The Authorization request header carries credentials that authenticate the client request, granting access to protected API endpoints.
API Usage & Best Practices
- Use the Bearer scheme: For modern token-based APIs (JWTs, OAuth2, API Keys), format the header as
Bearer <token>. - Never transmit sensitive keys in query strings: Always pass credentials in the
Authorizationheader to prevent them from being logged in proxy servers. - Shared caches skip authenticated responses: Per RFC 9111, a shared cache (like a CDN) must not store a response to a request that carried an
Authorizationheader unless the response explicitly opts in with a directive such aspublic,must-revalidate, ors-maxage.
Examples
GET /v1/leads HTTP/1.1Host: api.apiguide.devAuthorization: Bearer api_key_abc123xyz