Hello @maulik, @shobhitgunwant
“api/v1/account/getPngCard” I am getting 401 unauthorized error.
Can you please help me with this?
Steps I am following:-
-
https://dev.abdm.gov.in/gateway/v0.5/sessions/
Getting token -
https://healthidsbx.abdm.gov.in/api/v1/auth/authPassword
Header :{
Authorization : Bearer TOKEN
}
Body :{
“healthId”: “60-8203-1162-XXXX”,
“password”: “XXXXX”
}
Getting Response :-
{
token
expiresIn
refreshToken
refreshExpiresIn
}
-
https://healthidsbx.abdm.gov.in/api/v1/account/getPngCard
Header {
accept:/
Accept-Language:en-US
Authorization: Bearer {Previous API refreshToken}
X-Token: Bearer {Previous API Token}
}
Help If I have missed something
Hello,
Yes. I think you have set the wrong token.
https://dev.abdm.gov.in/gateway/v0.5/sessions/
Authorization: Bearer session token
https://healthidsbx.abdm.gov.in/api/v1/auth/authPassword
token
expiresIn
refreshToken
refreshExpiresIn
X-Token: Bearer token(auth password API response token)
1 Like
In the 3rd step In authorization don’t use Bearer {Previous API refreshToken} instead use token generated from https://dev.abdm.gov.in/gateway/v0.5/sessions/ as Authorization token ,refresh token would be used in case new token needs to be generated when old token has expired.
Thanks
1 Like