# Troubleshooting

Common symptoms when you call Provenance, what causes each one and the one-step fix, each linked to its error or reason code.

Find the symptom you see, then apply the fix. Each row links to its entry on [Errors](https://provenanceauth.com/docs/platform/errors.md) or [Reason codes](https://provenanceauth.com/docs/platform/reason-codes.md), which carry the full description.

## Requests and keys

| Symptom | Cause | Fix |
| --- | --- | --- |
| `404` [`route_moved`](https://provenanceauth.com/docs/platform/errors.md#route_moved) | The path is an old one that moved to its product's `/v1/{product}/…` path | Call `details.method` `details.path` instead; the [API reference](https://provenanceauth.com/docs/api.md) lists every endpoint under its product. |
| `401` [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required) | No `Authorization: Bearer` header | Send your key as `Authorization: Bearer $PROVENANCE_KEY`. |
| `401` [`invalid_api_key`](https://provenanceauth.com/docs/platform/errors.md#invalid_api_key) | The key is wrong, revoked or from the other environment | Copy the key again from the console, or use a sandbox key against the sandbox. |
| `403` [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope) | The key lacks the scope this route needs | Use a key with that product's scope; [Sandbox and keys](https://provenanceauth.com/docs/get-started/sandbox.md) lists each key's scopes. |
| `403` [`product_not_enabled`](https://provenanceauth.com/docs/platform/errors.md#product_not_enabled) | Your account doesn't have this product | Ask for the product on your account, or call the product your key is for. |
| `403` [`beta_access_required`](https://provenanceauth.com/docs/platform/errors.md#beta_access_required) | The operator has paused sign-ups and limited sign-in to a list of emails | Write to the contact address in the message, or sign in with an email on the list. |
| `400` [`idempotency_key_reused`](https://provenanceauth.com/docs/platform/errors.md#idempotency_key_reused) | The same `Idempotency-Key` was sent with a different body | Use a new key for a new request; reuse a key only to retry the same body. |

## Limits and plans

| Symptom | Cause | Fix |
| --- | --- | --- |
| `402` [`trial_ended`](https://provenanceauth.com/docs/platform/errors.md#trial_ended) | A Free trial counter is used up, or the 30 days ended | Choose a plan in **Settings → Plan & usage**; see [Plans and usage](https://provenanceauth.com/docs/account/plans-and-usage.md#free-trial). |
| `402` [`spend_cap_reached`](https://provenanceauth.com/docs/platform/errors.md#spend_cap_reached) | The month's usage reached the spend cap you set | Raise the cap in **Settings → Plan & usage**, or wait for the next billing month. |
| `402` [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required) | The feature needs a higher plan | Use the plan the error names in `error.details`. |
| `429` [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded) | Too many requests in the window | Wait the seconds in the `Retry-After` header, then retry; see [Rate limits](https://provenanceauth.com/docs/integrate/rate-limits.md). |

## Mandate and Authorize

| Symptom | Cause | Fix |
| --- | --- | --- |
| [`approval_pending`](https://provenanceauth.com/docs/platform/reason-codes.md#approval_pending) that never resolves | Nobody received the request, or it expired after 10 minutes | Check the approval in the console's Approvals inbox and the account's delivery channels; authorize again after it expires. |
| [`payload_hash_mismatch`](https://provenanceauth.com/docs/platform/reason-codes.md#payload_hash_mismatch) | The payload you verify isn't the one the token was issued for | Verify with the exact payload the agent authorized; never rebuild it from the request. |
| `binding: "mismatch"`, [`binding_mismatch`](https://provenanceauth.com/docs/platform/reason-codes.md#binding_mismatch) | The order or payload you sent to `POST /v1/verify` differs from the token's | Refuse the order, or ask the person to approve the new one. |
| `POST /v1/verify` answers [`status_unavailable`](https://provenanceauth.com/docs/platform/reason-codes.md#status_unavailable) | The revocation check couldn't run | Retry; accept on the offline checks alone only if your risk policy allows it. |
| An assistant reports [`session_stopped`](https://provenanceauth.com/docs/platform/reason-codes.md#session_stopped) | The person stopped that session in Provenance | Start a new session in the assistant. |
| An assistant reports [`session_limit`](https://provenanceauth.com/docs/platform/reason-codes.md#session_limit) | The session's limits don't allow the request | Ask the person to change the session's limits, or stay within them. |

## Identify, Trace and webhooks

| Symptom | Cause | Fix |
| --- | --- | --- |
| A signed request fails with [`signature_invalid`](https://provenanceauth.com/docs/platform/reason-codes.md#signature_invalid) and "created is in the future" or "created more than" | The signing machine's clock is off | Sync the clock with NTP and sign with `created` set to now. |
| `503` [`trace_fixture_miss`](https://provenanceauth.com/docs/platform/errors.md#trace_fixture_miss) in the sandbox | The sandbox model answers only recorded prompts | Send one of the prompts on the [Trace quickstart](https://provenanceauth.com/docs/trace/quickstart.md) exactly. |
| A webhook's signature doesn't verify | The body was parsed and re-serialized, or the secret is from another endpoint | Verify the raw request body with that endpoint's secret; see [Webhooks](https://provenanceauth.com/docs/integrate/webhooks.md). |

## Related

- [Errors](https://provenanceauth.com/docs/platform/errors.md)
- [Reason codes](https://provenanceauth.com/docs/platform/reason-codes.md)
- [Rate limits](https://provenanceauth.com/docs/integrate/rate-limits.md)
