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

confirmOtp public API is not wotking. Beneficiary Not Registered #433

Closed shekharkumar86 closed 3 years ago

shekharkumar86 commented 3 years ago

https://cdndemo-api.co-vin.in/api/v2/auth/public/confirmOTP

Req: OTP: 972119 {"otp":"6cdc0d09cdf9dd611044b9d0b2cc62828105b1fdd9001a4dac7743fc79601cc2","txnId":"ee694a2e-5467-4ffe-a5a8-56eced0ddf0f"} NOTE: OTP is convert SHA256 encrypted Response : {"errorCode":"USRAUT0024", "error":"Beneficiary Not Registered"}

But i have use same number which is already registered. I Have also add headers like requestBuilder.header("accept", "application/json,text/plain") requestBuilder.header("content-type", "application/json") requestBuilder.header("Accept-Language", "hi_IN") requestBuilder.header("charset", "utf8") requestBuilder.header("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36")

But getting the "Beneficiary Not Registered" with 400 bad request. Please help me...

badinenisaivardhan commented 3 years ago

Hey @shekharkumar86 , cowin api has two servers… one is sandbox server which is used for testing.. and one is prod server which is real one.. the issue is you are using demo api.. so it is returning an error … use prod sever auth instead sandbox You are using : cdndemo-api.co-vin.in You should use : cdn-api.co-vin.in

big89 commented 3 years ago

@badinenisaivardhan Check this scenario once on Production API and confirm the same from your side.

As per my experience, if there is no beneficiary added for the mobile number for which we are confirming OTP, then it return this error. But, if you have atleast one beneficiary added which is linked with the given mobile number, then if successfully returns Bearer token after confirming valid OTP.

Also, there seems some issue in Co-Win portal, that if we login & add new member, then it not shows there.

Thanks, Logicmaker

badinenisaivardhan commented 3 years ago

Hey @big89 I have tried sandbox and add,remove beneficiaries , book and cancel appointments ,found its working and in prod till the add and remove beneficiaries it is working fine , i have not tested the slot booking and cancellation, because there is no doses available in my entire state... once i i do i will update the same ...!

shekharkumar86 commented 3 years ago

resolve, need to use protected url