# Authentication

import { DocsAuthHeadersTable } from "../../src/components/docs/DocsAuthHeadersTable";
import { DocsCurlExample } from "../../src/components/docs/DocsCurlExample";

The ResellerClub API uses API key authentication. Use the **Authorize** button in the top bar to set credentials once — they apply to all endpoints across every API group.

When multiple API environments are configured (for example **Sandbox** and **Live**), choose the target in the **API environment** dropdown inside Authorize. Credentials are stored in your browser; use sandbox credentials against the Sandbox API and live API credentials against the Live API.

## Authentication headers

Send **both** headers on every request:

- `Authorization` — uses the `ApiKey` scheme: `Authorization: ApiKey YOUR_API_KEY`
- `X-User-Id` — your reseller user ID

In the **Authorize** dialog, enter your API key only (without the `ApiKey` prefix); the playground adds `ApiKey ` automatically when sending requests.

<DocsAuthHeadersTable />

Example:

<DocsCurlExample path="/domains" />

## Using the Authorize button

1. Click **Authorize** in the top bar
2. If shown, pick **Sandbox** or **Live** (or another configured target) from **API environment**
3. Enter your **X-User-Id** and API key (the `ApiKey` prefix is added for `Authorization` automatically)
4. Click **Test** on any endpoint — credentials and the selected base URL are included automatically

Credentials persist for your browser session while you browse the documentation.
