> For the complete documentation index, see [llms.txt](https://docs.biti.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.biti.so/getting-started/authentication.md).

# authentication

Biti has three kinds of access.

| Kind               | How                                                               | Use it for                                                                   |
| ------------------ | ----------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| Client credentials | `client_id` and `client_secret` in the request body. Server only. | Orders, mandates, holds, refunds, payouts, splits, bulk send, statement      |
| Customer token     | Header `X-Biti-Token: <access_token>`                             | Wallet balance, top-up methods, payment requests, profile, notifications     |
| Biti app           | The customer session and PIN, inside Biti                         | Approve connect, pay, decline, approve auto-pay and holds. Not for partners. |

{% hint style="info" %}
Use `X-Biti-Token`, not `Authorization: Bearer`.
{% endhint %}

A wrong `client_id` or `client_secret` always gives `Invalid client credentials`.

## Client credentials

Send both values in the JSON body. Call from your server only.

```json
{ "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET", "amount": 24.5 }
```

## Customer token

The `access_token` comes from `connect-status` or `exchange-login-code`. See [Connect a customer](file:///sirihduSQLZLwiPgqdx7/08c9d12f-863a-4aa7-9df8-1450285914df/guides/connect.md). Send it in a header:

```bash
curl "https://api.biti.so/partner/v1/wallets" -H "X-Biti-Token: YOUR_ACCESS_TOKEN"
```

A customer connects your app to one Active wallet of their own. You can see and charge that wallet only. To change the wallet, the customer reconnects.

## Scopes

| Scope                | Gives                 |
| -------------------- | --------------------- |
| `wallet.read`        | Balance and wallet    |
| `transactions.read`  | Transaction history   |
| `contacts.read`      | Contact list          |
| `profile.read`       | Name, email and phone |
| `notifications.send` | Send notifications    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.biti.so/getting-started/authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
