> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracenow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> How to authenticate requests to the tracenow API.

## Secret keys

Most API endpoints require a **secret key**. Pass it as a Bearer token in the `Authorization` header.

```http theme={null}
Authorization: Bearer tn_live_xxxxxxxxxxxxxxxxxxxx
```

Secret keys are prefixed with `tn_live_`. Get yours from the [dashboard](https://tracenow.io/dashboard).

<Warning>
  Secret keys have full access to your account. Never expose them in client-side code, browser requests, or public repositories.
</Warning>

## Publishable keys

The device endpoints (`/identify` and `/validate`) use a **publishable key** instead. Publishable keys are safe to embed in browser JavaScript.

```http theme={null}
POST /identify
Content-Type: application/json

{
  "publishable_key": "pk_live_xxxxxxxxxxxxxxxxxxxx",
  "components": { ... }
}
```

Publishable keys are prefixed with `pk_live_`. Find yours in the [dashboard](https://tracenow.io/dashboard) under **API Keys**.

## Error responses

| Status | Meaning                                                                                          |
| ------ | ------------------------------------------------------------------------------------------------ |
| `401`  | Missing or invalid API key                                                                       |
| `403`  | Valid key, but quota exhausted. [Subscribe or buy top-up credits](https://tracenow.io/dashboard) |
