Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nest API - How long do Per Access Token rate limitations last

Tags:

nest-api

Got hit with a Too Many Requests error whilst using an access token every 10 seconds. On re-reading the docs I realise this is a no-no ("To avoid errors we recommend you make requests at a rate of once per minute or less").

Anyone know how long I'll be limited for?

like image 398
thesimm Avatar asked Dec 20 '22 13:12

thesimm


1 Answers

Note: this is the current implementation. It may change.

The requests are counted using a one hour sliding window. If you use all of them in one second you'll need to wait an hour for the first one to drop out of the window.

If you use all of them in a 10 minute window you'll get one more request in 50 minutes, and then more requests over 10 minutes as more drop out of the sliding window.

like image 117
mccv Avatar answered Mar 08 '23 11:03

mccv