# UNAUTHORIZED

> HTTP 401. The request carried no credential, or one that isn't valid.

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


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.

## What to do

- Send the key in the `authorization` header, with the `Bearer ` prefix.
- Check that the key still exists on the [keys page](https://dashboard.intents.fi/keys), and that
  it is the right kind: a publishable key (`pk_`) cannot call secret-key endpoints.
- See [Account and API keys](/docs/get-started) for the four kinds of key and what each can reach.


## Example response

```json
{ "error": { "code": "UNAUTHORIZED", "message": "…" } }
```

---

Source: https://intents.fi/docs/errors/UNAUTHORIZED · The whole corpus: https://intents.fi/docs/llms-full.txt
