---
title: Exchange partner credentials for a token
endpoint: POST /api/v3/auth/tokens
description: Partner API access. This is not the customer login — see POST /api/v3/users/login.
---

`POST /api/v3/auth/tokens`

Your partner credentials in, a token out. Send the token as
`Authorization: Bearer <token>` on subsequent calls.

> **This is not the customer login**
>
> It authenticates **you**, not one of your customers. The customer's own login
> is [log a customer in](https://partner.btcdirect.eu/v3/api/login.md), and its token travels in
> `User-Authorization`. Sending a partner token where a customer token belongs is
> the most common cause of a `401` that looks inexplicable.

You do not need this call at all if you use an api key: `x-api-key` and
`Authorization` are alternatives, and sending both is a `403`. See
[authentication](https://partner.btcdirect.eu/v3/api/authentication.md).

## Request

| Field | Type | Required | Example | Description |
| --- | --- | --- | --- | --- |
| `username` | string | required | `your-partner-username` | Your partner credential, not a customer email. |
| `password` | password | required |  |  |

## Responses

| Status | Meaning |
| --- | --- |
| 200 | A partner token. |
| 400 | Invalid request. |
| 401 | Bad credentials. |
| 429 | `too_many_attempts` — too many failed partner logins from this address. The attempt was refused before the password was checked; wait `Retry-After` seconds before trying again. Told apart from bad credentials (401) so a client backs off instead of retrying into the limit. |
| 503 | `maintenance` — full maintenance is on, and every endpoint refuses every request until it ends (`endsAt`, when it has an end). Nothing is wrong with the request and nothing was done; the same request is accepted afterwards. `temporarily_unavailable` — the sign-in could not be decided because the identity service was unreachable; the credentials were neither accepted nor refused. Retry after `Retry-After` seconds. Told apart from any other 503, and from bad credentials (401), by `code`. |

| Field | Type | Required | Example | Description |
| --- | --- | --- | --- | --- |
| `token` | string | optional | `eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI5ZmM` |  |
| `refreshToken` | string | optional | `v3.rt.8f2c1d9a4b7e6301f5a2c8d4b9e0736a` |  |
