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

# Authentication

> Authenticate API requests with project-scoped keys

Send the key as a Bearer token:

```http theme={null}
Authorization: Bearer mbn_live_...
```

New integrations must use `mbn_test_` or `mbn_live_` project keys. Legacy keys can remain accepted during a compatibility window but should not be used for new work.

Never expose a key in browser JavaScript, a mobile binary, a query string, a public repository, or application logs.

## Key environments

Use a `mbn_test_...` key while developing and a `mbn_live_...` key only for production traffic. Keys are scoped to the project that created them. The project scope is selected by the key; it cannot be supplied or overridden in the request body.

## Rotation

Create a replacement key, deploy it to your server, verify traffic in the project logs, and then revoke the old key. If a key is exposed, revoke it immediately and create a replacement.

<Note>The API returns a request ID for support and troubleshooting.</Note>
