API Authentication
The LiquidA11y API uses API keys for authentication. All API requests must include your API key in the headers.
Getting Your API Key
- 1
Log in to your LiquidA11y account at dashboard
- 2
Go to Settings → API Keys
- 3
Click Generate New Key and give it a descriptive name
- 4
Copy your key immediately โ it won't be shown again
Using Your API Key
Include your API key in the Authorization header using Bearer token format:
HTTP Header
Authorization: Bearer your_api_key_here Example Requests
cURL
curl -X POST https://api.liquida11y.com/v2/scan \
-H "Authorization: Bearer sk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{"url": "https://yourstore.myshopify.com"}' JavaScript (fetch)
const response = await fetch('https://api.liquida11y.com/v2/scan', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_xxxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://yourstore.myshopify.com'
})
}); Python (requests)
import requests
response = requests.post(
'https://api.liquida11y.com/v2/scan',
headers={'Authorization': 'Bearer sk_live_xxxxx'},
json={'url': 'https://yourstore.myshopify.com'}
) Authentication Errors
| Status | Error | Solution |
|---|---|---|
| 401 | Missing API key | Add Authorization header with your API key |
| 401 | Invalid API key | Check your key is correct and not expired |
| 403 | Insufficient permissions | Your plan may not include API access |
| 429 | Rate limit exceeded | Wait before making more requests |
โ ๏ธ Security Best Practices
- โข Never expose API keys in client-side code โ only use them server-side
- โข Don't commit keys to version control โ use environment variables
- โข Rotate keys regularly โ regenerate if you suspect compromise
- โข Use separate keys for development and production