PHR Service /hid/auth-init API not working

Hi Team,
PHR Service API (https://dev.abdm.gov.in/cm/v1/apps/login/hid/auth-init) not working. It’s returning the below response while OTP is getting triggered(transactionId is not returned).
Response:

 {
   "error": {
    "code": 1511,
    "message": "An unexpected error has occurred. Please try again in sometime."
}

}
with status code 400.

We are blocked because of this. Please help us to resolve the issue as soon as possible. cc - @Shubhanshu_Shukla

Hello Team

We are also facing the same issue. Requesting to solve this on priority as it is blocking dev.

@abhishek1.kamla, @RishiPC,

Please check the below API and follow it if your facing problem please let us we will connect and close this issue.

/v0.5/users/auth/fetch-modes:

curl --location --request POST ‘https://dev.ndhm.gov.in/gateway/v0.5/users/auth/fetch-modes
–header ‘X-CM-ID: sbx’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2NjM5MTg3MTAsImlhdCI6MTY2MzkxODExMCwianRpIjoiNzNkN2MyZWMtOWQzNC00NmY2LWFmYTUtNGYzYWYyN2QyOWI4IiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiIxZWNkZGZiZS02ZTZhLTQ4YjAtYWI2My03ODY1Y2I3MzM4YTAiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJHT1ZJTkRfTFRJIiwic2Vzc2lvbl9zdGF0ZSI6IjM4NWVkMjNlLTQxOTAtNDI4YS1iZjA5LWJhMDIzMmI4Njg1YyIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImNtIiwiaGVhbHRoSWQiLCJPSURDIiwiZ2F0ZXdheSIsImhpcCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfSwiR09WSU5EX0xUSSI6eyJyb2xlcyI6WyJ1bWFfcHJvdGVjdGlvbiJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJjbGllbnRJZCI6IkdPVklORF9MVEkiLCJjbGllbnRIb3N0IjoiMTAuMjMzLjY4LjE5MyIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicHJlZmVycmVkX3VzZXJuYW1lIjoic2VydmljZS1hY2NvdW50LWdvdmluZF9sdGkiLCJjbGllbnRBZGRyZXNzIjoiMTAuMjMzLjY4LjE5MyJ9.k1MIAsHRcQy2Tgpg9S4dbjBDidP3Cij9DZh3Y5L8ZoSl0SjHCQCEMqlTSVcz1zYkoVbkjjJH2NafmuB-mnfK2ITjhArbqVJsJcBor21P75YU4Xi52ndZKDG8puPD29H058dJIZA9RTGq-W8HAvFsZMS8AO_SpcsMlaIHQh7–PCIn2yqhs8mao6FdFZXctOLtaKd86ugwAn81cbPszSr2pnt2BNeV7z5njJCtERRFMDT7jrOBLTbpeVKAFdc3RAU-g5jCrBAA-8aZ6u0wNj1TKbB1qc-v67vGpQMmAwIz-uGFCrvj5rqmFCcrgrxO0KmRbHvBzjRJXaESErwolVHdA’
–header ‘Content-Type: application/json’
–header ‘Cookie: TS01960242=01115a1c909d1b0fb6ede68c584e9a371d069e479cf10de468e93d254c087ce6a772df7449108bde2fd85ec77a4ae88b63895df563’
–data-raw ‘{
“requestId”: “8cd32a12-6c2a-4ad6-b6d9-55603d6ffe01”,
“timestamp”: “2022-09-23T07:39:05.298000”,
“query”: {
“id”: “govinddeshmukh@sbx”,
“purpose”: “KYC_AND_LINK”,
“requester”: {
“type”: “HIP”,
“id”: “GDeshmukh-HIP”
}
}
}’

/v0.5/users/auth/on-fetch-modes:

{
“requestId”: “d7f4fb03-5334-4a4a-aadf-3da62b82a89a”,
“timestamp”: “2022-09-23T07:35:23.349187”,
“auth”: {
“purpose”: “KYC_AND_LINK”,
“modes”: [
“PASSWORD”,
“AADHAAR_OTP”,
“DEMOGRAPHICS”,
“MOBILE_OTP”
]
},
“error”: null,
“resp”: {
“requestId”: “1c14ed9d-6cdd-4f24-b6a4-9af2c16f733f”
}
}

/v0.5/users/auth/init:

curl --location --request POST ‘https://dev.ndhm.gov.in/gateway/v0.5/users/auth/init
–header ‘X-CM-ID: sbx’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2NjM5MTg3MTAsImlhdCI6MTY2MzkxODExMCwianRpIjoiNzNkN2MyZWMtOWQzNC00NmY2LWFmYTUtNGYzYWYyN2QyOWI4IiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiIxZWNkZGZiZS02ZTZhLTQ4YjAtYWI2My03ODY1Y2I3MzM4YTAiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJHT1ZJTkRfTFRJIiwic2Vzc2lvbl9zdGF0ZSI6IjM4NWVkMjNlLTQxOTAtNDI4YS1iZjA5LWJhMDIzMmI4Njg1YyIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImNtIiwiaGVhbHRoSWQiLCJPSURDIiwiZ2F0ZXdheSIsImhpcCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfSwiR09WSU5EX0xUSSI6eyJyb2xlcyI6WyJ1bWFfcHJvdGVjdGlvbiJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJjbGllbnRJZCI6IkdPVklORF9MVEkiLCJjbGllbnRIb3N0IjoiMTAuMjMzLjY4LjE5MyIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicHJlZmVycmVkX3VzZXJuYW1lIjoic2VydmljZS1hY2NvdW50LWdvdmluZF9sdGkiLCJjbGllbnRBZGRyZXNzIjoiMTAuMjMzLjY4LjE5MyJ9.k1MIAsHRcQy2Tgpg9S4dbjBDidP3Cij9DZh3Y5L8ZoSl0SjHCQCEMqlTSVcz1zYkoVbkjjJH2NafmuB-mnfK2ITjhArbqVJsJcBor21P75YU4Xi52ndZKDG8puPD29H058dJIZA9RTGq-W8HAvFsZMS8AO_SpcsMlaIHQh7–PCIn2yqhs8mao6FdFZXctOLtaKd86ugwAn81cbPszSr2pnt2BNeV7z5njJCtERRFMDT7jrOBLTbpeVKAFdc3RAU-g5jCrBAA-8aZ6u0wNj1TKbB1qc-v67vGpQMmAwIz-uGFCrvj5rqmFCcrgrxO0KmRbHvBzjRJXaESErwolVHdA’
–header ‘Content-Type: application/json’
–header ‘Cookie: TS01960242=01115a1c909d1b0fb6ede68c584e9a371d069e479cf10de468e93d254c087ce6a772df7449108bde2fd85ec77a4ae88b63895df563’
–data-raw ‘{
“requestId”: “15883007-1ac8-4f7a-a55e-1bd159f340de”,
“timestamp”: “2022-09-23T07:39:05.298000”,
“query”: {
“id”: “govinddeshmukh@sbx”,
“purpose”: “KYC_AND_LINK”,
“authMode”: “MOBILE_OTP”,
“requester”: {
“type”: “HIP”,
“id”: “GDeshmukh-HIP”
}
}
}’

/v0.5/users/auth/on-init:

{
“requestId”: “96a4c030-49f5-4ffe-8555-121695341ca2”,
“timestamp”: “2022-09-23T07:36:59.929604”,
“auth”: {
“transactionId”: “6983d83c-aa14-41eb-9530-73aa72b8ed8d”,
“mode”: “MOBILE_OTP”,
“meta”: {
“hint”: null,
“expiry”: “2022-09-23T09:36:59.929615”
}
},
“error”: null,
“resp”: {
“requestId”: “5b16341a-7f41-4647-94cc-ff1a8c80cd62”
}
}

/v0.5/users/auth/confirm:

curl --location --request POST ‘https://dev.ndhm.gov.in/gateway/v0.5/users/auth/confirm
–header ‘X-CM-ID: sbx’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2NjM5MTg3MTAsImlhdCI6MTY2MzkxODExMCwianRpIjoiNzNkN2MyZWMtOWQzNC00NmY2LWFmYTUtNGYzYWYyN2QyOWI4IiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiIxZWNkZGZiZS02ZTZhLTQ4YjAtYWI2My03ODY1Y2I3MzM4YTAiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJHT1ZJTkRfTFRJIiwic2Vzc2lvbl9zdGF0ZSI6IjM4NWVkMjNlLTQxOTAtNDI4YS1iZjA5LWJhMDIzMmI4Njg1YyIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImNtIiwiaGVhbHRoSWQiLCJPSURDIiwiZ2F0ZXdheSIsImhpcCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfSwiR09WSU5EX0xUSSI6eyJyb2xlcyI6WyJ1bWFfcHJvdGVjdGlvbiJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJjbGllbnRJZCI6IkdPVklORF9MVEkiLCJjbGllbnRIb3N0IjoiMTAuMjMzLjY4LjE5MyIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicHJlZmVycmVkX3VzZXJuYW1lIjoic2VydmljZS1hY2NvdW50LWdvdmluZF9sdGkiLCJjbGllbnRBZGRyZXNzIjoiMTAuMjMzLjY4LjE5MyJ9.k1MIAsHRcQy2Tgpg9S4dbjBDidP3Cij9DZh3Y5L8ZoSl0SjHCQCEMqlTSVcz1zYkoVbkjjJH2NafmuB-mnfK2ITjhArbqVJsJcBor21P75YU4Xi52ndZKDG8puPD29H058dJIZA9RTGq-W8HAvFsZMS8AO_SpcsMlaIHQh7–PCIn2yqhs8mao6FdFZXctOLtaKd86ugwAn81cbPszSr2pnt2BNeV7z5njJCtERRFMDT7jrOBLTbpeVKAFdc3RAU-g5jCrBAA-8aZ6u0wNj1TKbB1qc-v67vGpQMmAwIz-uGFCrvj5rqmFCcrgrxO0KmRbHvBzjRJXaESErwolVHdA’
–header ‘Content-Type: application/json’
–header ‘Cookie: TS01960242=01115a1c909d1b0fb6ede68c584e9a371d069e479cf10de468e93d254c087ce6a772df7449108bde2fd85ec77a4ae88b63895df563’
–data-raw ‘{
“requestId”: “8bd9ca65-7437-4542-873b-13888d28e47d”,
“timestamp”: “2022-09-23T07:39:05.298000”,
“transactionId”: “6983d83c-aa14-41eb-9530-73aa72b8ed8d”,
“credential”: {
“authCode”: “974538”
}
}’

/v0.5/users/auth/on-confirm:

{
“requestId”: “d3cf6d25-2d6a-40aa-82e6-056ca8df330a”,
“timestamp”: “2022-09-23T07:38:02.213899”,
“auth”: {
“accessToken”: “eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJnb3ZpbmRkZXNobXVraEBzYngiLCJyZXF1ZXN0ZXJUeXBlIjoiSElQIiwicmVxdWVzdGVySWQiOiJHRGVzaG11a2gtSElQIiwicGF0aWVudElkIjoiZ292aW5kZGVzaG11a2hAc2J4Iiwic2Vzc2lvbklkIjoiMzIzZDY3NTEtZjIzOC00ODZmLTk1MzYtMjM0YzAyOGFkMDgxIiwiZXhwIjoxNjY0MDA1MDgwLCJpYXQiOjE2NjM5MTg2ODB9.IcVPrbW7Tviff7KGqi4Sg2TKwsu-nWqo3bqMtf4rOPLGE4umzcHDuAZAjRXUcxSBL18JBSiPqobUvqzHsCZZyJgImi5BHLdyIBJM1JzrZEPItITIm9vbLtAb4V4w-zi881VuADlDuEfbUDus0KE9zPzfN-RPKunhFAuoz7WgP5gYFdZci8eliSzaWbIAOpNQaRx-A2yu8JZ_-Me86-bOa2KJqN4e0p94yJbBUbET3oYfO80wCu6NyVAeqrWupbMGxZfqcTpEyxedzkdYyPmf0OPMgFG84vm6Yws4ifoMdIzmO-QnC3UnIEmttH2vlCRKjJB1bTbUiZAG8xykWf2gMg”,
“patient”: {
“id”: “govinddeshmukh@sbx”,
“name”: “Deshmukh Govind Nanasab”,
“gender”: “M”,
“yearOfBirth”: 1993,
“monthOfBirth”: 11,
“dayOfBirth”: 5,
“address”: {
“line”: null,
“district”: “NANDED”,
“state”: “MAHARASHTRA”,
“pincode”: null
},
“identifiers”: [
{
“type”: “MOBILE”,
“value”: “7013061970”
},
{
“type”: “HEALTH_NUMBER”,
“value”: “58-5412-3783-0306”
}
]
}
},
“error”: null,
“resp”: {
“requestId”: “20d63b6a-8203-4c7e-963b-602a1301c28e”
}
}

/v0.5/links/link/add-contexts:

curl --location --request POST ‘https://dev.ndhm.gov.in/gateway/v0.5/links/link/add-contexts
–header ‘X-CM-ID: sbx’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIi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TAuMjMzLjY4LjE5MyJ9.k1MIAsHRcQy2Tgpg9S4dbjBDidP3Cij9DZh3Y5L8ZoSl0SjHCQCEMqlTSVcz1zYkoVbkjjJH2NafmuB-mnfK2ITjhArbqVJsJcBor21P75YU4Xi52ndZKDG8puPD29H058dJIZA9RTGq-W8HAvFsZMS8AO_SpcsMlaIHQh7–PCIn2yqhs8mao6FdFZXctOLtaKd86ugwAn81cbPszSr2pnt2BNeV7z5njJCtERRFMDT7jrOBLTbpeVKAFdc3RAU-g5jCrBAA-8aZ6u0wNj1TKbB1qc-v67vGpQMmAwIz-uGFCrvj5rqmFCcrgrxO0KmRbHvBzjRJXaESErwolVHdA’
–header ‘Content-Type: application/json’
–header ‘Cookie: TS01960242=01115a1c909d1b0fb6ede68c584e9a371d069e479cf10de468e93d254c087ce6a772df7449108bde2fd85ec77a4ae88b63895df563’
–data-raw ‘{
“requestId”: “ed404017-7c37-42b0-a3e6-7f1eed677ba2”,
“timestamp”: “2022-09-23T07:39:05.298000”,
“link”: {
“accessToken”: “eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJnb3ZpbmRkZXNobXVraEBzYngiLCJyZXF1ZXN0ZXJUeXBlIjoiSElQIiwicmVxdWVzdGVySWQiOiJHRGVzaG11a2gtSElQIiwicGF0aWVudElkIjoiZ292aW5kZGVzaG11a2hAc2J4Iiwic2Vzc2lvbklkIjoiMzIzZDY3NTEtZjIzOC00ODZmLTk1MzYtMjM0YzAyOGFkMDgxIiwiZXhwIjoxNjY0MDA1MDgwLCJpYXQiOjE2NjM5MTg2ODB9.IcVPrbW7Tviff7KGqi4Sg2TKwsu-nWqo3bqMtf4rOPLGE4umzcHDuAZAjRXUcxSBL18JBSiPqobUvqzHsCZZyJgImi5BHLdyIBJM1JzrZEPItITIm9vbLtAb4V4w-zi881VuADlDuEfbUDus0KE9zPzfN-RPKunhFAuoz7WgP5gYFdZci8eliSzaWbIAOpNQaRx-A2yu8JZ_-Me86-bOa2KJqN4e0p94yJbBUbET3oYfO80wCu6NyVAeqrWupbMGxZfqcTpEyxedzkdYyPmf0OPMgFG84vm6Yws4ifoMdIzmO-QnC3UnIEmttH2vlCRKjJB1bTbUiZAG8xykWf2gMg”,
“patient”: {
“referenceNumber”: “TMH-PUID-111”,
“display”: “Common Cold”,
“careContexts”: [
{
“referenceNumber”: “123456”,
“display”: “Prescribed Dolo for treatment”
}
]
}
}
}’

/v0.5/links/link/on-add-contexts:

{
“requestId”: “9f5d9000-ff32-4a3b-bceb-f74cedcc939e”,
“timestamp”: “2022-09-23T07:39:08.695126”,
“acknowledgement”: {
“status”: “SUCCESS”
},
“error”: null,
“resp”: {
“requestId”: “afd3db4e-9032-4d65-ba83-11bb7154cf54”
}
}

Thanks.

1 Like

Hi @Govind_Deshmukh, this is working for us also. We are facing issues in sandbox EMRs and RAXA HIP which are required to perform testing. Below is the link of the issue which we are facing.
Issue: Sandbox EMRs are not able to link the careContext also not responding to data transfer requests