A basic telegram bot that checks CoWin vaccination slot periodically
Description
This app was developed for my personal use, it is running on a Raspberry Pi 3 at my home currently. This is a very basic telegram notification bot that runs every minute for checking CoWin Vaccination slot availability. This app uses the official CoWin APIs to fetch data. The bot will check for slots in the districts given in the config. CoWin has some kind of IP blocking, was unable to run this on a cloud VM at the time of writing this documentation.
If you are Thiruvananthapuram, Kerala, you can join this Telegram channel, this is where I'm getting my notifications now: https://t.me/tvmcowinavailability
How To Get Your District ID & Configure This App
You'll need the following configuration items for this to work:
- District ID you want to search slots for
- A telegram channel id
- A telegram bot added to the above channel, we need the bot token to be exact
Follow the below steps to configure the app:
- Clone this repo
- Get your state id from the config file:
cowin-slot-availability-checker/config.js
Line 21 in d396879
- Run
curl https://cdn-api.co-vin.in/api/v2/admin/location/districts/<YOUR_STATE_ID_HERE>
. For examplecurl https://cdn-api.co-vin.in/api/v2/admin/location/districts/17
- The response to above curl will have your district IDs, identify the id of district(s) you want to monitor
- Update your district ID here:
- Create a Telegram channel & update the channel id here:
- Create a Telegram bot & add it to your channel, follow this guide: https://www.logaster.com/blog/how-create-telegram-channel/
- Once you've adedded the the bot to your channel, update your bot API token here:
cowin-slot-availability-checker/config.js
Line 17 in d396879
- Run
npm install within the directory
- Run the app by
node index.js
Application Flow