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

Unauthenticated access! When trying to create new beneficiary using protected API's #514

Open rajashekar12345 opened 3 years ago

rajashekar12345 commented 3 years ago

We got the protected API access along with the key. While we are trying to create a new beneficiary API "https://cdn-api.co-vin.in/api/v2/registration/beneficiary/new" with the following steps

  1. generate OTP using "https://cdn-api.co-vin.in/api/v2/auth/public/generateOTP".
  2. Converting the OTP received on mobile to SHA 256 format.
  3. Passing the SHA256 format of OTP and txnId to API "https://cdn-api.co-vin.in/api/v2/auth/public/confirmOTP"
  4. The bearer token received is passed to the Beneficiary registration API "https://cdn-api.co-vin.in/api/v2/registration/beneficiary/new".
  5. Getting the response as Unauthenticated access!
labmanipal commented 3 years ago

did you solved this, if yes please let me know how you did you fixed

dmdhrumilmistry commented 2 years ago

have y'all tried passing the generated token in headers?