Hi
I got the correct token in my app first and then revoke the account on LIFX cloud. I use the old token to try to get list, LIFX cloud return 429 code to me.
According to the table, I think the code should let me know the account has revoked not 429 too many requests.
Update: sorry, my mistake. I have found the unauthorized 401 code in return data.
Update 2: I found I sometimes get 401 and sometimes 429.
You’re right, there are two things going on here.
When a token is revoked you will get a 401. We don’t differentiate between non-existant, malformed, or revoked tokens. They’re all “unauthorised”.
When you make more than 120 requests in 60 seconds we refuse to process your request and instead return a 429. Please keep within this limit to ensure everyone using the HTTP API gets a fair distribution of resources.
The reason why you’re sometimes getting a 401 and sometimes getting a 429 is because we apply rate limiting before we perform authorisation.
At any rate, you can get yourself going again by creating a new token.
We have confirmed the issue. It is due to our rate limiting treating all unauthorized requests as the same account. So we were allowing only 120 invalid token requests globally before triggering the rate limiting. Clearly this is a mistake and we are working on a fix as we speak.
We expect to have the fix in production by the end of the day in Melbourne (about 3 hours from now).