India's Co-Win vaccine slot tracker bot for telegram using bash. This will list down all the available vaccine slots till the next two weeks for people aged 18+.
Also, these scripts must run on Indian IP addresses as Co-win API is country restricted. If your VPS isn't Indian location based, either change the server location to India or create a proxy. The easiest way to create a proxy is by using AWS Lambda and API Gateway.
- Install jq to your machine.
- If you're using linux, change the
gdate
todate
incovin_scheduler.sh
script. If using mac, install coreutils using brew -brew install coreutils
- Give execution permission to both the shell scripts:
chmod +x covin.sh
chmod +x covin_scheduler.sh
- Run the
covin_scheduler.sh
shell script to send out alerts to telegram.
./covin_scheduler.sh district_id telegram_token telegram_chat_id
If you just want to print out the results, run the covin.sh
shell script.
./covin.sh district_id date
Example:
./covin.sh 651 15-05-2021
To get your appropriate district_id
, use the following steps:
- Fetch the states:
https://cdn-api.co-vin.in/api/v2/admin/location/states
- Using
state_id
from the above API, get thedistrict_id
by calling this:
https://cdn-api.co-vin.in/api/v2/admin/location/districts/$state_id