How to authenticate with x-api-key and best practices for securing your integration
x-api-key
HTTP header.
Keys are issued from your Blockworks Research account and are tied to your organization/plan.
Topic | TL;DR |
---|---|
Header | x-api-key: YOUR_API_KEY |
Where to get it | Blockworks Research → User Dropdown → Account Management → API |
Scope | Works across all documented endpoints unless noted otherwise |
Rotation | Create a new key, update your services, then revoke the old key |
Errors | Missing/invalid → 401 Unauthorized , insufficient access → 403 Forbidden |
x-api-key
on every request.dev
, staging
, prod
.Status | Type | Why it happens | How to fix |
---|---|---|---|
401 Unauthorized | missing_api_key | Header not present or malformed | Add x-api-key with a valid key |
401 Unauthorized | invalid_api_key | Unknown or revoked key | Use an active key or rotate |
403 Forbidden | insufficient_scope | Key lacks access to the requested resource | Request access or use a key with the right plan/scope |
429 Too Many Requests | rate_limited | Exceeded your plan limits | Backoff/retry with jitter, consider higher tier |
5xx | internal_error | Transient service issue | Retry with exponential backoff and idempotency where applicable |
api.blockworks.com
).