Skip to content

hummerbliss/cowin-public

 
 

Repository files navigation

Get me my goddamn vaccine

This only works if the phone you get OTPs on is an Android phone.

Things you'll need to have before you get this running:

  1. Tampermonkey
  2. Google Messages as the default SMS app on your phone
  3. Node.js
  4. Google Chrome

Setup

Code

  1. Clone this repo or download ZIP. If you are downloading the ZIP, extract it. Clone this repo

Google Messages

  1. Set Google Messages as your default SMS app
  2. Log in to https://messages.google.com/web and start getting SMSes on your Google Chrome
  3. On your Google Messages Web, open the conversation where you get OTPs from CoWIN. If you don't have any OTPs from CoWIN yet, try logging into CoWIN. When you do open the conversation, the URL looks something like this: https://messages.google.com/web/conversations/617 with the number 617 at the end replaced by something else.

Tampermonkey

  1. While still on the Google Messages conversation page, open Tampermonkey extension and click on "Create a new script..." Tampermonkey
  2. On the Tampermonkey page that just opened, replace the existing code with the one in tampermonkey.js file from this repo
  3. On line 7 in the code set replace https://messages.google.com/web/conversations/617 URL with the URL of conversation with OTPs in your Google Messages Web. The number "617" would be changed by something else.
  4. Refresh Google Messages Web page

Config

  1. Open config.json file
  2. Set the name as the exact name you have set in CoWIN
  3. Set your phone number
  4. Set your age
  5. Set whether or not you want Covaxin. (true/false)
  6. On line 7, set the "search" URL. Watch this video to learn how to get this URL: https://youtu.be/a-nJBLbIdTw

Node.js

  1. Navigate from terminal/command-prompt to the directory with the code
  2. Execute npm i

Running the scripts

  • If you already have an appointment, execute node reschedule
  • If you don't already have an appointment, execute node schedule

Next Steps

  • You will keep getting OTPs every 15 minutes to log in
  • Do not close the Google Messages Web tab. If you use a tab suspender on your browser, whitelist the URL.
  • Keep the terminal running.
  • If the script fails for some reason, you will stop getting OTPs. Re-run node reschedule or node schedule.
  • You'll get an SMS as soon as your appointment has been scheduled or rescheduled.
  • You'll keep seeing an error every 5 seconds. You can ignore the error.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%