# Keys, sandbox and live

> Test and live keys, keeping keys off browsers, refusals and rate limits.

Every request to activQC is made with a secret API key in the `Authorization` header:

```bash
curl -s "$ACTIVQC_BASE_URL/v1/ping" -H "Authorization: Bearer $ACTIVQC_KEY"
```

## Two kinds of key

| Key | Starts with | What it does |
|---|---|---|
| Test | `wqc_test_` | Works from the day you join. The same checks run, and the data stays apart from live data. Matching against other recordings can be limited or simulated, and the finding says so. |
| Live | `wqc_live_` | Opens once your account is live. Each finished check is counted in your usage. |

Make and revoke keys in your console under **Developers → API keys**. A key is shown **once**, when it is made; we
keep only a fingerprint of it, so it cannot be shown again or recovered. If a key leaks, revoke it and make a new one.

## Keep keys on your server

A key acts with your whole account's rights. Never put one in a browser, a mobile app or a public repository.
Browsers reach activQC in two safe ways:

- **The embedded builder, mastering bench or stem splitter.** Your server swaps its key for a short-lived, single-use
  session token. See [Embed the release builder](https://activqc.wavbee.com/docs/embed-builder.md).
- **Live updates.** Your server mints a ten-minute token for one browser. See [Live updates](https://activqc.wavbee.com/docs/live-updates.md).

## When a key is refused

| Status | `code` | Means |
|---|---|---|
| 401 | `authentication_failed` | The key is missing, unknown, revoked or expired. |
| 402 | `account_not_live` | A live key on an account that is not live yet, or is paused for payment. Test keys still work. |
| 403 | `feature_not_enabled` | Your account does not include this. The error names the `feature`. |
| 429 | `rate_limited` | Too many requests this minute. Wait `Retry-After` seconds. |

## Rate limits

| Key | Per minute (sustained) | Burst |
|---|---|---|
| Test | 60 | 120 |
| Live | 600 | 1,200 |

Every response says where you stand: `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until
the window resets).
