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

Request for help regarding Generate OTP API #318

Open worstcoderofalltime opened 3 years ago

worstcoderofalltime commented 3 years ago

I am getting Response [403] when hitting the public api: https://cdn-api.co-vin.in/api/v2/auth/public/generateOTP

I am using below JSON:

{ "mobile": "9876543210" }

Is this alright or I need to hit the private api: https://cdn-api.co-vin.in/api/v2​/auth​/generateOTP and something more to the request like 'secret' key as below?

{

"secret":"U2FsdGVkX1/JL3gfdhdxA7QIYB9xxdXiQd1Mz4frcbUdcoA+q44cPIOD+EZ/mQTKKRQ5jWl6KDmqgDbdgfTadA==", "mobile":"9876543210" }

In that case how do I generate this secret key?

kichappa commented 3 years ago

Is this alright?

No, you need to pass the secret also.

In that case how do I generate this secret key?

Any working secret should work perpetually (unless CoWin portal gets updated and older versions get purged).

krodhking commented 3 years ago

I am passing secret key and mobile both, but still getting exception error like ""{"errorCode":"USRAUT0010", "error":"Mobile is Required"}. is there any place where we can check from where we can get the value of "secret" key to be passed

kichappa commented 3 years ago

@krodhking You may check out this file.