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

502 Bad Gateway #248

Open gaurav8809 opened 3 years ago

gaurav8809 commented 3 years ago

Getting 502 Bad Gateway error while accessing this api

https://api.demo.co-vin.in/api/v2/appointment/sessions/public/findByPin?pincode=394210&date=19-05-2021

ninjabhishek commented 3 years ago

I am getting 200. Is this happening from local browser or your code on any cloud?

gaurav8809 commented 3 years ago

I just checked It is working now But still not getting any data

ninjabhishek commented 3 years ago

No data means there's no slot available for given criteria

gaurav8809 commented 3 years ago

@ninjabhishek Yes I know that means no slots but getting same result as centers = [] when calling this api https://api.demo.co-vin.in/api/v2/appointment/centers/public/findByLatLong?long=72.6822091&lat=21.1594627

And "Unauthenticated access!" when using production server host

ninjabhishek commented 3 years ago

@gaurav8809 for accessing production server, you will need permission and access key from MoH

gaurav8809 commented 3 years ago

@ninjabhishek How can I do it?

gaurav8809 commented 3 years ago

@ninjabhishek Also at least I should get data of centers from findByLatLong api through test server If no data exist then why server host is in exist? We should be able to access some test data

ninjabhishek commented 3 years ago

@gaurav8809 Can you try checking for a district and see if they are giving any data on test server? As far as getting the access key for prod is concerned, I don't think they will share to individual developers. If getting it was that easy, paytm would have incorporated it. They route to cowin site instead

ninjabhishek commented 3 years ago

However, I see the token to pass can be fetched by sending and confirming OTP on prod api. See https://documenter.getpostman.com/view/9564387/TzRPip7u#bc8f4d99-fdf8-4742-8d8c-c916e2be2371. I have not tried it so not 100% sure

gaurav8809 commented 3 years ago

I have already tried with token too Still getting "Unauthenticated access!" error