Skip to main content

API Authentication and Rate Limits

How to authenticate API requests and understand rate limits.

Edward Boatman avatar
Written by Edward Boatman
Updated today

Learn how to authenticate your API requests and work within Lingo's rate limits.

Authentication

All API requests must include your API token for authentication.

Using your token

Include your API token in the request header:

Authorization: Bearer YOUR_API_TOKEN

Token security

  • Never share your API token publicly

  • Don't commit tokens to version control

  • Use environment variables to store tokens in your applications

  • Regenerate your token if you suspect it's been compromised

Rate limits

To ensure fair usage and system stability, the API has rate limits:

  • Requests are limited per minute and per hour

  • Rate limit headers are included in API responses

  • Exceeding limits returns a 429 (Too Many Requests) status

Rate limit headers

Check these headers in API responses:

  • X-RateLimit-Limit - Maximum requests allowed

  • X-RateLimit-Remaining - Requests remaining in current window

  • X-RateLimit-Reset - When the limit resets

Handling rate limits

If you hit rate limits:

  1. Check the X-RateLimit-Reset header

  2. Wait until the reset time before retrying

  3. Consider implementing exponential backoff

  4. Optimize your code to reduce unnecessary requests

Learn more

Did this answer your question?