cowinapi / developer.cowin

This group is created to facilitate technical and integration discussions related to cowin platform. API related contents can be obtained at API setu portal https://apisetu.gov.in/public/marketplace/api/cowin
115 stars 30 forks source link

Cannot make request to apis when deployed on heroku. Shows error 403 #389

Closed imabhijith25 closed 3 years ago

imabhijith25 commented 3 years ago

I wrote a telegram bot that would send requests to cowin server. I am able to test it on a development server but when I deploy it on heroku it gives out error 403 when accessed The code was written in python headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}

resp = requests.get("https://cdn-api.co-vin.in/api/v2/admin/location/districts/{ids}".format(ids=ids),headers=headers)

resp returns error 403

shivkant1418 commented 3 years ago

Hey, That's because you can access COWIN Api via an Indian server. Please try using AWS, Azure, etc. with the Indian region data server. I also tried with Heroku but failed even digital ocean also didn't work for me. Now, when I started using AWS it's working fine.

Thanks!

imabhijith25 commented 3 years ago

Thanksss

soorajjose commented 3 years ago

I can access the api from heruku . See my project Covid vaccine notifier . This is node js app

imabhijith25 commented 3 years ago

I can access the api from heruku . See my project Covid vaccine notifier . This is node js app

I checked your request parameters, it didn't work for me

soorajjose commented 3 years ago

@imabhijith25 Are you using public api ?

rahulshinde11 commented 3 years ago

I made this website that sends free personalized vaccine availability alerts based on centers/hospitals on WhatsApp. Have a look or share it with someone who might need it. Would love your feedback.https://vaccine.india-covid.info/