Bearer token
All requests to the DataLink APIs platform must include your API key as a Bearer token in theAuthorization header.
Example
Getting your API key
- Log in to your DataLink dashboard
- Navigate to API Keys
- Copy your key — it is shown once in full at creation
Key format
| Prefix | Environment |
|---|---|
dl_live_ | Production — real credits are deducted |
dl_test_ | Test mode — no credits deducted, responses are mocked |
Test mode keys are available on Starter and Pro plans.
Security best practices
Never expose keys client-side
Never expose keys client-side
API keys must only be used server-side. Embedding a key in browser JavaScript, a mobile app binary, or a public repository will expose it to anyone who reads the source.
Use environment variables
Use environment variables
Store your key in an environment variable (e.g.
DATALINK_API_KEY) and reference it in code — never hardcode it as a string literal.Rotate keys if compromised
Rotate keys if compromised
If you suspect a key has been exposed, generate a new one from the dashboard immediately. Old keys are revoked as soon as a replacement is created.
Error responses
If your key is missing or invalid, the API returns a401 response:
402: