{"_id":"55f28173f9f3991900f38a18","category":{"_id":"55f28172f9f3991900f38a15","version":"55f28172f9f3991900f38a13","__v":1,"pages":["55f28173f9f3991900f38a17","55f28173f9f3991900f38a18","55f28173f9f3991900f38a19","55f28173f9f3991900f38a1a","55f28173f9f3991900f38a1b","55f28173f9f3991900f38a1c"],"project":"54ebb40d6423300d003672c0","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-17T04:27:26.544Z","from_sync":false,"order":1,"slug":"overview","title":"Overview"},"project":"54ebb40d6423300d003672c0","user":"557e2561eb75d80d00af3dab","version":{"_id":"55f28172f9f3991900f38a13","project":"54ebb40d6423300d003672c0","__v":2,"createdAt":"2015-09-11T07:23:30.065Z","releaseDate":"2015-09-11T07:23:30.065Z","categories":["55f28172f9f3991900f38a14","55f28172f9f3991900f38a15","55f28172f9f3991900f38a16","55f66acb297b37170058accb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"__v":4,"parentDoc":null,"updates":["579131402a66760e00c76572"],"next":{"pages":[],"description":""},"createdAt":"2015-06-17T04:41:35.213Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Rate limiting is performed on a per user, per application basis, effectively making it per access token.\n\nCurrently, each access token is limited to 120 requests for a 60 second window, however this may change in the future.\n\nIf you breach the rate limit, you will receive a status code of `429 Too Many Requests`.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Header\",\n    \"h-1\": \"Explanation\",\n    \"0-0\": \"`X-RateLimit-Limit`\",\n    \"0-1\": \"The total number of requests per 60 second window.\",\n    \"1-0\": \"`X-RateLimit-Remaining`\",\n    \"1-1\": \"The number of requests you are allowed to make in the current 60 second window.\",\n    \"2-0\": \"`X-RateLimit-Reset`\",\n    \"2-1\": \"The [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time) for when the next window begins.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Retrying\",\n  \"body\": \"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 in `X-RateLimit-Reset`.\\n\\nLIFX reserves the right to disable access for any applications that consistently make requests beyond the allowed rate limit.\"\n}\n[/block]","excerpt":"Preventing yourself from overloading our servers","slug":"rate-limits","type":"basic","title":"Rate Limits"}

Rate Limits

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`. [block:parameters] { "data": { "h-0": "Header", "h-1": "Explanation", "0-0": "`X-RateLimit-Limit`", "0-1": "The total number of requests per 60 second window.", "1-0": "`X-RateLimit-Remaining`", "1-1": "The number of requests you are allowed to make in the current 60 second window.", "2-0": "`X-RateLimit-Reset`", "2-1": "The [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time) for when the next window begins." }, "cols": 2, "rows": 3 } [/block] [block:callout] { "type": "warning", "title": "Retrying", "body": "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 in `X-RateLimit-Reset`.\n\nLIFX reserves the right to disable access for any applications that consistently make requests beyond the allowed rate limit." } [/block]