> For the complete documentation index, see [llms.txt](https://orbit-b2b.gitbook.io/orbit-b2b-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://orbit-b2b.gitbook.io/orbit-b2b-docs/partner-api/authentication.md).

# Authentication

The Partner API uses OAuth2 client credentials. Every path in this reference is relative to one fixed base URL: `https://wholesale-frontend.nileva.net` — this app is hosted for you at that one address, there's no separate host to stand up or fill in per integrator.

1. In **Orders → Partner API**, click **Create client** and give it a label (e.g. the name of your system).
2. Copy the **Client ID** and **Client Secret** shown — the secret is shown once and can't be retrieved again. If you lose it, revoke the client and create a new one.
3. Exchange them for an access token:

   ```
   POST /api/partner/v1/oauth/token
   Content-Type: application/json

   { "grant_type": "client_credentials", "client_id": "...", "client_secret": "..." }
   ```

   Response: `{ "access_token": "...", "token_type": "Bearer", "expires_in": 3600 }`
4. Send the access token on every other call: `Authorization: Bearer <access_token>`. Request a new one once it expires — tokens are not refreshed automatically.

Revoking a client in the admin takes effect immediately: any token already issued to it stops working on its next request.
