ABHA number creation API is throwing unauthorized error

Hi,

I want to generate ABHA number using aadhar. For this, I am trying to access the below API first. But I am getting unauthorized error. please help on addressing this issue.

Request : https://healthidsbx.abdm.gov.in/api/v1/registration/aadhaar/generateOtp

Response : {
“timestamp”: “2023-03-21T09:46:54.173+0000”,
“status”: 401,
“error”: “Unauthorized”,
“message”: “Unauthorized”,
“path”: “/api/v1/registration/aadhaar/generateOtp”
}

I generated access token using ‘https://dev.abdm.gov.in/gateway/v0.5/sessions

What I am trying is correct?. How can I check the role of my client id? My client id is DMD_1894624

@Areeb - please look into this

@Selvalakshmi please refer devforum link Getting : HIS-500 in response, while using ABHA APIs for the curl

Thank you @SARCH1

This is working now. I realized that I have not given the Authorization token correctly