Skip to content

Unsupported authorization scheme

HTTP 401unsupported_auth_scheme

When the API answers 401 unsupported_auth_scheme, and how to fix it.

Version v1.1, updated

The type field of every unsupported_auth_scheme response links to this page.

On this page

The Authorization header is there, but it does not use the Bearer scheme. The API reads a key only from Authorization: Bearer followed by the key.

At a glance

  • Status: 401 Unauthorized

  • Code: unsupported_auth_scheme

  • Retry: No. Fix the cause first: the same request gets the same answer.

Causes and fixes

Likely cause

How to fix it

The header uses another scheme, such as Basic or Token.

Write Bearer, a space, then the key.

The header holds the key alone, without Bearer.

Add Bearer and a space before the key.

Your HTTP library builds the header from a user name and a password.

Set the header yourself, instead of the basic authentication option of the library.

Example

401 unsupported_auth_schemeJSON
{
  "code": "unsupported_auth_scheme",
  "detail": "The Authorization header must use the Bearer scheme: \"Authorization: Bearer <key>\".",
  "instance": "/v1/categories",
  "request_id": "a1b2c3d4-0000-4000-8000-0000000000ee",
  "status": 401,
  "title": "Unsupported authorization scheme",
  "type": "https://birp.io/developers/errors/unsupported_auth_scheme"
}
  • first-request
  • requests
  • api-key-missing