Open HimanshuGupta26 opened 3 years ago
You need to pass Authorization Bearer token in header which you will get in confirm OTP response.
curl -X GET "https://cdndemo-api.co-vin.in/api/v2/appointment/centers/findByLatLong?lat=28.7&long=77.1" -H "accept: application/json" -H "Accept-Language: en_US" -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxx"
Thanks, Logicmaker
Thank you for your support. Yes, it worked. But I have another query. Like on UAT v2/appointment/sessions/calendarByPin API is needing Authentication header but checked same for Production, it didn't need it
It seems like public API call without any user specific authorization to get such data.
Also, as production APIs having registered access with API key, may not required Authorization header.
Thanks, Logicmaker
But I tried Production API as it is. Hit this as a Get URL, https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByPin?pincode=147301&date=15-06-2021, Data will be fetched
And for /v2/appointment/sessions/calendarByPin and /v2/appointment/sessions/calendarByDistrict API, response is always as below: "centers": [] Can you tell me some pin codes on which I can get Data
And for /api/v2/registration/beneficiary/new API, I am getting Status Code 403, ERROR: The request could not be satisfied
Status Code 403 means server refuses your request somehow.
Make sure request is like -
curl -X POST "https://cdn-api.co-vin.in/api/v2/registration/beneficiary/new" -H "accept: application/json" -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: application/json" -d "{\"name\":\"Apparao\",\"birth_year\":\"1980\",\"gender_id\":1,\"photo_id_type\":1,\"photo_id_number\":\"9999\",\"comorbidity_ind\":\"Y\",\"consent_version\":\"1\"}"
Thanks, Logicmaker
Status Code 403 means server refuses your request somehow.
Make sure request is like -
curl -X POST "https://cdn-api.co-vin.in/api/v2/registration/beneficiary/new" -H "accept: application/json" -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: application/json" -d "{"name":"Apparao","birth_year":"1980","gender_id":1,"photo_id_type":1,"photo_id_number":"9999","comorbidity_ind":"Y","consent_version":"1"}"
Thanks, Logicmaker
I am talking about UAT API. Please check what's the issue with that.
And for /v2/appointment/sessions/calendarByPin and /v2/appointment/sessions/calendarByDistrict API, response is always as below: "centers": [] Can you tell me some pin codes on which I can get Data
Please suggest what to do as UAT testing cannot be proceeded
It seems like public API call without any user specific authorization to get such data.
Also, as production APIs having registered access with API key, may not required Authorization header.
Thanks, Logicmaker
Please suggest in this case also. As UAT and Production flow should be same.
API is restricted to 25 calls per hour now so please code accordingly !!!
And for /v2/appointment/sessions/calendarByPin and /v2/appointment/sessions/calendarByDistrict API, response is always as below: "centers": [] Can you tell me some pin codes on which I can get Data
Please suggest what to do as UAT testing cannot proceed
Please update on it. It is blocker for me
And for /v2/appointment/sessions/calendarByPin and /v2/appointment/sessions/calendarByDistrict API, response is always as below: "centers": [] Can you tell me some pin codes on which I can get Data
Please suggest what to do as UAT testing cannot proceed
Please update on it. It is blocker for me
Please update on it.
And for /v2/appointment/sessions/calendarByPin and /v2/appointment/sessions/calendarByDistrict API, response is always as below: "centers": [] Can you tell me some pin codes on which I can get Data
Please suggest what to do as UAT testing cannot proceed
Please update on it. It is blocker for me
Please update on it.
Please update on it. It's really Important
Thank you for your support. Yes, it worked. But I have another query. Like on UAT v2/appointment/sessions/calendarByPin API is needing Authentication header but checked same for Production, it didn't need it
@HimanshuGupta26 Can you share working curl request for the same
Sir, currently I am stuck due to no data on Staging for v2/appointment/sessions/public/calendarByPin and v2/appointment/sessions/public/calendarByDistrict
I am getting getting Unauthenticated access! with Status code 401 for /v2/appointment/centers/findByLatLong. I am sending the header key as "x-api-key" and the value that is given on swagger documentation