How to create health ID with aadhar otp

We have integrated /v1/registration/aadhaar/createHealthIdWithAadhaarOtp to create health ID with aadhar otp but the following API has been removed from version1.Can anyone provide the updated sequence of API’s and the parameters to be generated to create health id with aadhar otp in version 2 .

AFAIK:

  1. /v2/registration/aadhaar/generateOtp
  2. /v2/registration/aadhaar/verifyOTP
  3. /v2/registration/aadhaar/phr-address
  4. /v2/registration/aadhaar/confirm
  1. /v2/registration/aadhaar/confirm it says verify mobile number error at 4th point but my same mobile number is linked with aadhar

AFAIK:

  1. /v2/registration/aadhaar/generateOtp
  2. /v2/registration/aadhaar/verifyOTP
  3. /v2/registration/aadhaar/checkAndGenerateMobileOTP
  4. /v2/registration/aadhaar/verifyMobileOTP (If point 3 returns mobileLinked: false)
  5. /v2/registration/aadhaar/phr-address
  6. /v2/registration/aadhaar/confirm

Sorry I have updated my answer. I think we need to call checkAndGenerateMobileOTP ( 1. /v2/registration/aadhaar/checkAndGenerateMobileOTP). If it returns mobileLinked: false then we need to do mobile verification.

Not sure though.

Hey

We are on the same boat, struggling to understand the flow. Does anyone has information on what’s the right sequence of API calls?

I have used the below sequence of api’s

  1. /v2/registration/aadhaar/generateOtp
  2. /v2/registration/aadhaar/verifyOTP
  3. /v2/registration/aadhaar/checkAndGenerateMobileOTP
  4. /v2/registration/aadhaar/verifyMobileOTP
  5. /v2/registration/aadhaar/confirm

In the following sequence provided to create health id using aadhar /v2/registration/aadhaar/verifyMobileOTP gives incorrect otp error even after providing correct otp.

For us, step 5 is always giving out errors. 401 Unauthorized. Whereas other APIs work and other registrations are happening fine. We are passing the Authorization header that is required as per ther swagger.

Tried to execute on swagger too after adding the required headers but it only fails at the same last step.

{
    "timestamp": "2022-01-27T05:38:58.194+0000",
    "status": 401,
    "error": "Unauthorized",
    "message": "Unauthorized",
    "path": "/api/v2/registration/aadhaar/confirm"
}

@ayush please use /v2/account/phr-linked

use the mentioned API to link the ABHA address to ABHA Number.

request:
{
“phrAddress”: “xxx@sbx”,
“preferred”: true
}

Please call confirm api after this.