# Frequently asked questions

> **No.** A `429 Too Many Requests` error means you have exceeded the API **rate limit**: a maximum number of requests per minute, counted **per company and per endpoint**. It has nothing to do with your photo and video quota.

# Frequently asked questions from developers

## I get a 429 error: is my quota used up?

| | Rate limit | Quota |
|---|---|---|
| **What is counted** | The number of API requests per minute | Certified photos, signatures and videos |
| **What happens when exceeded** | `429` error; the limit frees up by itself in less than a minute | New items are no longer certified until the top-up |
| **What to do** | Wait for the delay indicated by the `Retry-After` header, then retry | Top up the quota from the administration interface |

Each response contains the `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` headers, which let you slow down before reaching the limit. Per-endpoint values and best practices are detailed in [Rate limits](./rate_limits.md).

For the quota, see [Insufficient quota: what should I do?](../aide/quota-insuffisant.md).

## I am not receiving the webhook: what should I check?

The webhook is sent **only once, when the case is closed**, regardless of the closing channel (app, Certilink, API or SDK). Check, in order:

1. **Is the case actually closed?** A case in progress does not trigger any delivery.
2. **Is the webhook configured on the right company and the right environment?** Pre-production and production each have their own configuration. See [Configuration](./webhook.md#configuration).
3. **Does the URL meet the constraints?** It must use **HTTPS**, with a **domain name**: an IP address is rejected. See [URL constraints](./webhook.md#url-constraints).
4. **Does your endpoint accept the authentication sent?** Check the expected header (`Authorization` or `security-token`) and its value, or the HMAC signature. See [Authenticating the incoming call](./webhook.md#authenticating-the-incoming-call).
5. **Does your endpoint respond with a 2xx, quickly?** Respond immediately, then do your processing in the background.

:::warning No automatic retry
If your endpoint is unreachable or responds with an error, the delivery **is not retried**. Set up a periodic catch-up with `GET /cases?format=metadata&closed=true&hours=…` to retrieve closed cases whose webhook did not reach you. See [Delivery guarantees](./webhook.md#delivery-guarantees).
:::

## Pre-production or production: what are the differences?

They are **two completely separate environments**: accounts, templates, cases and configuration from one are not visible in the other.

| Environment | Base URL | Usage |
|---|---|---|
| **Pre-production** | `https://dev.certificall.app/certificall/` | Develop and test your integration |
| **Production** | `https://admin.certificall.app/certificall/` | Your real cases |

## How do I move from pre-production to production?

Nothing is transferred automatically from one environment to the other. To go live, redo the following in production:

| To redo | How |
|---|---|
| **The API account** | Create a production API account, with an email address different from the pre-production one. See [Create a dedicated API account](./compte_api.md). |
| **The base URL** | Replace the pre-production URL with the production one in your configuration. |
| **The templates** | Recreate or import your templates in the production administration interface. Their identifiers (`frameId`) will be different: update them in your integration. |
| **The webhook** | Configure your webhook URL and authentication again in production. |
| **The SDK keys** | If you use the mobile SDK, use the key provided for production. |

:::tip Keep your configuration per environment
Store the base URL, credentials and `frameId` values in environment variables rather than in the code. Going live then simply comes down to switching configuration.
:::
