Preventing yourself from overloading our servers
Rate limiting is performed on a per user, per application basis, effectively making it per access token.
Currently, each access token is limited to 120 requests for a 60 second window, however this may change in the future.
If you breach the rate limit, you will receive a status code of 429 Too Many Requests
.
Header | Explanation |
---|---|
X-RateLimit-Limit | The total number of requests per 60 second window. |
X-RateLimit-Remaining | The number of requests you are allowed to make in the current 60 second window. |
X-RateLimit-Reset | The Unix timestamp for when the next window begins. |
Retrying
If you are implementing a behavior that retries on errors please make sure that you respect the rate limit by reading the headers above. In particular if the
X-RateLimit-Remaining
is less than or equal to zero you should not make another request until the time specified inX-RateLimit-Reset
.LIFX reserves the right to disable access for any applications that consistently make requests beyond the allowed rate limit.