pallupz / covid-vaccine-booking

This tool can be used to automate booking slots on Co-WIN Platform.
MIT License
598 stars 533 forks source link

too many requests #219

Closed riya2305 closed 3 years ago

riya2305 commented 3 years ago

Unable to Generate OTP 429 { "error": "Too Many Requests" }

@pallupz please help

riya2305 commented 3 years ago

can anybody help asap

riya2305 commented 3 years ago

also, why is the otp being asked after 5 mins again and again it used to be after 15mins , earlier??

manojagarwal68 commented 3 years ago

Yeah, have noticed this issue today. Not sure when it started. Are others facing this issue as well?

pallupz commented 3 years ago

There isn't much documentation on the API but my guess is you're hitting the API rate limiter perhaps

aascagarwal commented 3 years ago

Here is my thought.. As per API the limit is 100 request per 5 minutes Which is 1 request per 3 seconds.. Even though the minimum refresh frequency is set to 5 secs. There is also a request in parallel to verify the beneficiary for token expiration, making it 2 requests per 5 secs and 100 request in 2.5 minutes which voilates the api rate limit

aascagarwal commented 3 years ago

Is that sarcastic?

pallupz commented 3 years ago

the math doesn't make a lot of sense (assuming rate limiter is applicable for ALL endpoints and hits across all endpoints are counted together in their calculation) but there isn't much we can do from a code point of view either.