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

# Authentication

> Authenticate with the Reseller API using your reseller key.

Every request to the Reseller API carries your reseller key in a header:

```text theme={null}
x-reseller-key: rsl_...
```

Note that this is a different header from the one used by the [residential usage API](/residentials/basics), which uses `x-api-key`. The reseller key is scoped to your reseller account and its data pool.

```bash cURL theme={null}
curl https://api.roundproxies.com/reseller/account \
  -H "x-reseller-key: rsl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

## Keeping your key safe

<Warning>
  Your reseller key can spend your data allocation. Treat it like a password: keep it server-side, and never put it in client-side code, URLs, or logs.
</Warning>

Your key is shown **once**, when it's issued. There's no way to read it back later.

## Rotating your key

If you lose your key — or suspect it's been exposed — rotate it from your Roundproxies dashboard under **Reseller → Rotate key**.

Rotation is immediate and unforgiving:

* The old key stops working the moment the new one is issued. There's no grace period.
* The new key is shown once, same as the original.
* Any running integration still sending the old key starts failing with `401 Invalid reseller API key`.

Deploy the new key everywhere before you rotate, or expect a gap.

<Note>
  Rotating your key does not affect your sub-users. Their proxy credentials are independent and keep working.
</Note>

## Troubleshooting

| Problem                             | Likely cause                       | Fix                                                                                                                                     |
| ----------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `401 Invalid reseller API key`      | Wrong key, or the key was rotated. | Check the key in use against `apiKeyPrefix` from [`GET /reseller/account`](/reseller/basics#your-account); rotate and redeploy if lost. |
| `401 Reseller account is suspended` | Your reseller account is on hold.  | Contact support. Existing sub-users keep working until their data runs out.                                                             |
| Worked yesterday, fails today       | Someone rotated the key.           | Retrieve the current key from the dashboard and redeploy.                                                                               |

See [Error Handling](/reseller/error-handling) for the full error reference.
