Links the given ABHA Address to the ABHA number

Hi @adnan_360 @Arvind_Tomar @Shubhanshu_Shukla
/v2/account/phr-linked
{
“phrAddress”: “salahpa@sbx”,
“preferred”: false
}

getiing
{
“code”: “HIS-500”,
“message”: “An unexpected error has occured. Please try again in sometime.”,
“details”: null
}

in postman.

Please check what will be the issue?
Is this API intended for link new phr address to ABHA Number?

Thanks
SALAHUDHEEN

Hi @salahudheen

The request you call v2/account/phr-linked
is working fine right now as per your response in the swagger UI I have been
tested so please use the captcha token in the Authentication
and use X-Token in the Bearer mention you generate please put that
there is no such error In that

Thanks & Regards
Adnan

1 Like

The same authorization token from session??
Need to replace Bearer with Captcha_ ??

Please Update
Thanks
SALAHUDHEEN

Hi @salahudheen

Please token with paste captcha in the token auth
and x token and hit the call to linked phr

Thanks
Adnan

There is some confusion here @adnan_360
We are authenticating the user through the phr flow given here https://sandbox.abdm.gov.in/swagger/ndhm-phr-app2.yaml. And the token which we are getting is X-AUTH-TOKEN.
So how can we utilize these ABHA number profile APIs which are given here in this swagger with that X-AUTH-TOKEN token?
And if we cannot, what should be the flow?
We are making a phr app and these are the functionalities that we plan to integrate.

@Shubhanshu_S kindly guide here.
Thanks and regards,
HID Support Team

We have to pass this X-Auth-Token in the header of every profile APIs, this token is working as a unique key for every user. Please let me know if the issue still persist.

Thanks

Hi @salahudheen please use postman for Api testing , take refrence from swagger and implement in postman.

@IntegrationSupport

I am getting an ‘Unauthorized’ error while calling this API. Please help me to continue.

curl --location ‘https://healthidsbx.abdm.gov.in/api/v2/account/phr-linked
–header ‘accept: /
–header ‘Accept-Language: en-US’
–header ‘X-Token: Bearer eyJhbGciOiJSUzUxMiJ9.eyJwaW5jb2RlIjoiMTEwMDAxIiwic3ViIjoiZGhhbnlha24xMEBzYngiLCJjbGllbnRJZCI6IlNCWF8wMDMwMjgiLCJyZXF1ZXN0ZXJJZCI6IlBIUi1XRUIiLCJnZW5kZXIiOiJGIiwiZGlzdHJpY3ROYW1lIjoiQ0VOVFJBTCIsIm1vYmlsZSI6Ijk2MDUyOTI4OTciLCJmdWxsTmFtZSI6IkRoYW55YSBLIE4iLCJhZGRyZXNzTGluZSI6IkMvTyA6IFNyaW1vbiBWIFMgMTAyIEIgREQgTWlzdHkgSGlsbHMgVG93ZXIgTm8gMSBNaWxsdW1wYWRpIE5hdm9kaGF5YSBLYWtrYW5hZCBQIE8gS2Fra2FuYWQgS2Fra2FuYWQiLCJoZWFsdGhJZE51bWJlciI6IjkxLTY4NjAtNjAxMi03MzI3IiwibW9udGhPZkJpcnRoIjoiOSIsInN5c3RlbSI6IkFCSEEtQSIsInN0YXRlTmFtZSI6IktFUkFMQSIsImRheU9mQmlydGgiOiIxMCIsInBock1vYmlsZSI6Ijk2MDUyOTI4OTciLCJleHAiOjE3MDE2NjY3OTIsImlhdCI6MTcwMTA2MTk5MiwicGhyQWRkcmVzcyI6ImRoYW55YWtuMTBAc2J4IiwiZW1haWwiOiJkaGFueWFAZm91bmRpbmdtaW5kcy5jb20iLCJ0eG5JZCI6IjY4OGFjZmMwLWRjZjEtNGM4Yi1hZjYxLTdhMDA0NTE5Nzc5ZSIsInllYXJPZkJpcnRoIjoiMTk4OSJ9.ZzhyH4g61Qh7RjAyse263IPfO4uMqacY8SsJYz6r_d6Oymon0XVH_xrr9THbz6Rf3dIgE-EQ5bhbuOqbJCKpZ3z9brwpZdpVwFQmspmVvfjkZa1F-et95p2zxJrLtdVSSf51pVpvmbFbLJdHKNoJTvpoDPmgDUH4OpjEzHyzwt3o8VbIMV1brwUBsbnRifKfw3V2xMIG1nEvWf0JFmWOtFqS3LipMwit97P3GXmnC4wnc8uIFJxXtQvYT0kkeO4keoLsD4T2BpBHVlnGJWYEIhenctBg28tmr0ac9VSJqXXyecleaTKzMQ2lO6fOIAfaJjS0xOyrlQe_zEJ3Nq_DMw’
–header ‘Content-Type: application/json’
–data-raw ‘{
“phrLinkedOrDeLinkedRequestPayLoad”:“phrLinkedOrDeLinkedRequestPayLoad”,
“phrAddress”: “dhanyakn10@sbx”,
“preferred”: true
}’

Hi @dhanyathanmayi
Please use authorisation token also in header and try