Learn how to authenticate with the Limitly API
Authorization
curl -H "Authorization: Bearer lk_1234567890abcdef1234567890abcdef" \ https://api.limitly.dev/v1/keys
lk_
lk_1234567890abcdef1234567890abcdef
const response = await fetch('https://api.limitly.dev/v1/keys', { headers: { 'Authorization': 'Bearer lk_1234567890abcdef1234567890abcdef', 'Content-Type': 'application/json' } }); const data = await response.json();
curl -X GET \ -H "Authorization: Bearer lk_1234567890abcdef1234567890abcdef" \ -H "Content-Type: application/json" \ https://api.limitly.dev/v1/keys
401 Unauthorized
{ "error": "Invalid API key", "code": "INVALID_API_KEY" }
# .env LIMITLY_API_KEY=lk_1234567890abcdef1234567890abcdef
const apiKey = process.env.LIMITLY_API_KEY; const response = await fetch('https://api.limitly.dev/v1/keys', { headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' } });
429 Too Many Requests
{ "error": "Rate limit exceeded", "code": "RATE_LIMIT_EXCEEDED" }
Was this page helpful?