SRvSaha / CoWinVaccineSlotFinder

Cross-Platform Software to Fetch the Available Slots & Book the Appointment for COVID-19 Vaccination
https://shawt.io/r/sYv
MIT License
81 stars 32 forks source link

OTP not generating immediately after 15 minutes #65

Closed subashjain closed 3 years ago

subashjain commented 3 years ago

once logged in using 4.2.0 it will run for 4-8 minutes before exiting like this [FATAL] Response From Server: Too many hits from your IP address, hence request has been blocked. You can try following options : 1.Switch to a different network which will change your current IP address. 2.Close the application and try again after sometime

Press Enter Key to Exit The Application ..... then again running cowincore.exe it will use authtoken and it will run for some time and again it will exit, two to four times it will run like this for 20-25 minutes without asking for OTP immediately after 15 minutes, is it ok? it will book even after 15 minutes without new OTP? or this is a bug? before in v4.1.0 immediately at 15 minutes it is ask otp, JUST FOR YOUR INFORMATION. Thanks for your wonderful work

SRvSaha commented 3 years ago

@subashjain Hi, It is not a bug. Actually IP Throttling is being implemented in the CoWIN APIs aggresively hence after a certain duration you get the FATAL message of Too many hits.

It is okay to close it and run it since they keep checking hits from your Public IP. Now, since your pubilc IP Address from your ISP is being shared with many people, hence sometimes you may feel that you tried just a couple of times and are getting Too Many Hits error. This is because the combined count of hits from your Public IP from all people has reached the limit.

OTP is being asked only when your session is expired at the server side, in case CoWIN APIs still feel your are authenticated, you won't get the OTP for re-entering. Your booking would work perfectly, no worries. In case you feel, you should refresh your session after 15 minutes explicitly, just delete the authToken.json file and you are good to go. OTP would get re-generated.

Till v4.1.0, IP Throttling was not in picture hence these kind of issues were not faced.

Thanks :) Feel free to Star the Repo and share in your circles.

subashjain commented 3 years ago

Bro one more question for 45+ age what to edit in appsettings.json file. it is okay if minimum age 45, maximum age 99.

SRvSaha commented 3 years ago

@subashjain Yes that is perfect! Give a star if I could help. Closing the Issue.