# Troubleshoot Authentication and Access

> Diagnose OptionData API key, subscription, rate-limit, query-width, and timeout failures without exposing credentials.

Use the HTTP status, stable error code, and request type to separate authentication problems from entitlement, rate-limit, and query-shape problems.

## Start with this checklist

1. Confirm you can sign in to the intended OptionData account.
2. Confirm you have accepted the Historical Data Agreement.
3. Open [Billing](/billing) and verify the subscription is `trialing` or `active`.
4. Copy the current key from [API Key](/api_key).
5. Ensure the application is using that current key—not a value cached before regeneration.
6. Test one small HTTP request before testing a long-running client.


## HTTP status guide

| Status | Meaning | Recommended action |
|---|---|---|
| `400` | Request validation or public SQL guard failed | Correct body fields, dates, filters, or SQL |
| `401` | Key missing, malformed, stale, or not owned by the current account | Recopy the key and check the bearer header |
| `403` | Customer recognized but not entitled | Check your subscription at the response's `billing_url` (`/billing`) |
| `404` | Option Chain `SNAPSHOT_NOT_FOUND` or `SYMBOL_NOT_FOUND`: no chain stored for that date or symbol | Check the symbol and date |
| `422` | Historical SQL or Option Chain request exceeded a guardrail | Narrow date, symbol, expiration, or strike scope |
| `429` | Rate limit exceeded | Honor `Retry-After` and back off |
| `504` | Query timed out | Split the request into smaller windows |
| `500` | Unexpected service failure | Retry once, then contact support with the request reference if supplied |

A failed renewal payment keeps access for 7 days from the start of the unpaid billing period; after that, requests return `403` until the invoice is paid.

## After regenerating a key

The previous portal key stops working immediately. Update every deployment environment and restart consumers. Verify one authenticated HTTP `200` response.

## Contact support safely

Send:

- account email
- endpoint and approximate timestamp
- HTTP status and stable error code
- request reference ID, if the server returned one
- final four characters of the key only, if identification is necessary

Never send the complete API key, card number, bank details, ClickHouse password, or raw authorization header.
