diff --git a/references/api/api-keys.mdx b/references/api/api-keys.mdx index c5c308f..cec822d 100644 --- a/references/api/api-keys.mdx +++ b/references/api/api-keys.mdx @@ -1,11 +1,9 @@ --- title: "API keys and Rate Limits" -description: "Create API keys in the Relay Dashboard to authenticate requests and raise your rate limits" +description: "Create API keys in the Relay Dashboard to authenticate requests and manage your rate limits" --- -Relay enforces rate limits to keep the platform reliable for every integrator. Default limits apply to unauthenticated traffic; an API key raises those limits and attributes each request to your account. - -You manage keys in the [Relay Dashboard](https://dashboard.relay.link) — create new keys, rotate existing ones, and inspect individual requests. +Relay enforces rate limits to keep the platform reliable for every integrator. You manage API keys in the [Relay Dashboard](https://dashboard.relay.link) — create new API keys, rotate existing ones, and inspect individual requests. Default limits listed below apply to self-serve API keys. ## Creating an API key @@ -30,9 +28,9 @@ The [Relay Dashboard](https://dashboard.relay.link) is also where you observe wh When debugging a specific transaction, paste the `requestId` from your application into the dashboard's search to jump straight to the matching record. -## Default Rate Limits (no API key) +## Default Rate Limits -The following limits apply to unauthenticated requests: +The following limits apply per API key: | Endpoint | Limit | | ---------------------- | ----------------------- | @@ -41,9 +39,9 @@ The following limits apply to unauthenticated requests: | `/transactions/status` | 200 requests per minute | | Other endpoints | 200 requests per minute | -## API key Rate Limits +## Elevated Rate Limits -Authenticated requests get higher limits, applied per key: +Higher limits are available on request, applied per key: | Endpoint | Limit | | ---------------------- | ----------------------- | @@ -52,13 +50,13 @@ Authenticated requests get higher limits, applied per key: | `/transactions/status` | 10 requests per second | | Other endpoints | 200 requests per minute | -API keys are recommended for server-side production integrations and higher-throughput use cases. +To request higher limits, get in touch through the support widget in the [Relay Dashboard](https://dashboard.relay.link). ## How to Use an API key ### HTTP requests -Pass the key in the request headers on every call where you want elevated limits: +Pass the key in the request headers on every request: ``` x-api-key: YOUR_API_KEY @@ -97,7 +95,7 @@ const quote = await getClient()?.actions.getQuote(quoteParams, undefined, { ### Proxy API -If you're calling the SDK from the browser, stand up a proxy that appends the key server-side and point `baseApiUrl` at it. This keeps the key out of client bundles while preserving elevated limits. +If you're calling the SDK from the browser, stand up a proxy that appends the key server-side and point `baseApiUrl` at it. This keeps the key out of client bundles while preserving your key's rate limits. ```typescript import { diff --git a/references/api/api_guides/websockets.mdx b/references/api/api_guides/websockets.mdx index 1db3ef8..a067f23 100644 --- a/references/api/api_guides/websockets.mdx +++ b/references/api/api_guides/websockets.mdx @@ -31,7 +31,7 @@ Refer to the guide below on how to integrate the websocket into your application ## **Authentication** -The Websocket Service is available for anyone with strict rate limits. For customers with an API key it can be used for authentication for higher rate limits, the service is available at the following URL `wss://ws.relay.link` +The Websocket Service uses an API key for authentication and is available at the following URL `wss://ws.relay.link` To connect using an API key, provide your API key as a query param in the connection url: @@ -39,8 +39,6 @@ To connect using an API key, provide your API key as a query param in the connec const wss = new ws(`wss://ws.relay.link?apiKey=${YOUR_API_KEY}`); ``` -Authentication is generally not required in client-side applications. - **The websocket server needs to restart to deploy updates** diff --git a/references/api/quickstart.mdx b/references/api/quickstart.mdx index b7d34fb..67f642e 100644 --- a/references/api/quickstart.mdx +++ b/references/api/quickstart.mdx @@ -23,7 +23,7 @@ Follow this 5-step flow to integrate Relay into your application: ### API key Provisioning - Create an API key in the [Relay Dashboard](https://dashboard.relay.link) to raise your rate limits.
+ Create an API key in the [Relay Dashboard](https://dashboard.relay.link).
See [API keys and Rate Limits](/references/api/api-keys) for usage and limits.
diff --git a/snippets/GetAnApiKey.mdx b/snippets/GetAnApiKey.mdx index ae565b5..2b72e26 100644 --- a/snippets/GetAnApiKey.mdx +++ b/snippets/GetAnApiKey.mdx @@ -1,3 +1,3 @@ -Create an API key in the [Relay Dashboard](https://dashboard.relay.link) to raise your rate limits. +Create an API key in the [Relay Dashboard](https://dashboard.relay.link).