Skip to content

UNAUTHORIZED

The request carried no credential, or one that isn’t valid.

HTTP status
401 Unauthorized
Code
UNAUTHORIZED

Most endpoints need an API key as a Bearer token (authorization: Bearer ik_test_…). The public checkout endpoints take the invoice’s client secret instead, and dashboard actions a signed-in session. This code means the expected credential was missing or not recognised. Nothing was done.

  • Send the key in the authorization header, with the Bearer prefix.
  • Check that the key still exists on the keys page, and that it is the right kind: a publishable key (pk_) cannot call secret-key endpoints.
  • See Account and API keys for the four kinds of key and what each can reach.
{ "error": { "code": "UNAUTHORIZED", "message": "…" } }