Issue with Sharing Patient Profile with HIP API in Production Environment

Hello @IntegrationSupport @Ramandeep1

When attempting to share a patient profile with the HIP (Health Information Provider), the API does not work as expected in the production environment. However, it was functioning correctly in the sandbox mode.

Here is the code I am using to make the API request:

const axios = require(‘axios’);
let data = JSON.stringify({
“requestId”: “7162fc4e-b027-4eb8-b99d-c176385c6003”,
“intent”: {
“type”: “Self-requested”
},
“location”: {
“latitude”: “string”,
“longitude”: “string”
},
“hipDetails”: {
“hipId”: “IN3410000260”,
“code”: “12345”
}
});

let config = {
method: ‘post’,
maxBodyLength: Infinity,
url: ‘https://live.abdm.gov.in/cm/v1/patients/profile/share’,
headers: {
‘X-AUTH-TOKEN’: ‘Bearer eyJhbGciOiJSUzUxMiJ9.eyJwaW5jb2RlIjpudWxsLCJzdWIiOiJhLmdhdXRoYW1AYWJkbSIsImNsaWVudElkIjoiUEhSLVdFQiIsInJlcXVlc3RlcklkIjoiUEhSLVdFQiIsImdlbmRlciI6Ik0iLCJkaXN0cmljdE5hbWUiOm51bGwsIm1vYmlsZSI6IjkzNDYyNTM5MjUiLCJmdWxsTmFtZSI6IkFra2FsYWRldmkgR291dGhhbSIsImFkZHJlc3NMaW5lIjoiQy9PIEFra2FsYWRldmkgTXVyYWxpZGhhciAxMS0xOS0xMzYgS2FzaGlidWdnYSBXYXJhbmdhbCBXYXJhbmdhbCIsImhlYWx0aElkTnVtYmVyIjoiOTEtNjcyMy0xMTYyLTU4ODkiLCJtb250aE9mQmlydGgiOiIxMSIsInN5c3RlbSI6IkFCSEEtQSIsInN0YXRlTmFtZSI6IkFOREhSQSBQUkFERVNIIiwiZGF5T2ZCaXJ0aCI6IjMiLCJwaHJNb2JpbGUiOiI5MzQ2MjUzOTI1IiwiZXhwIjoxNjg2OTg2NTIyLCJpYXQiOjE2ODY5NzkzMjIsInBockFkZHJlc3MiOiJhLmdhdXRoYW1AYWJkbSIsImVtYWlsIjpudWxsLCJ0eG5JZCI6ImVmNTIzZWMxLWIyMTItNGY0ZS05NDc3LTgxZjA0MmM3NzBhNyIsInllYXJPZkJpcnRoIjoiMjAwMCJ9.rHhacXaOLcaJv_1IWFtGB0OegcF-Mp6oQnlEn6Wmp4YUgdcNixihzWLgdSIgSgY3hAkeotm0WtZcjPQek0yy5YLLOfVeQaOFWRnW3ZcRQyigtYteQGodC0P4wKsIEPzmY4CS-cF_L3TXCjtZsoId_l6N1mNRx0ye8QDhUqLr27txRINnwKf857JTb6_p-nDBU–ePiSh5CsR6wuj-kHSl34JMwJT0EBqFfFieihAQq5IuUa0VqVtxouxneM4O2aADugqENE4D_m1_GcXgPCGxHgiA29LRnHWCxkGBYnBNEQlvMbeR0cO0UTHyVNY4mgNlt2OAd6IkkO3aglgY59Iog’,
‘Content-Type’: ‘application/json’
},
data : data
};

axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});

Please let me know if there are any additional details or troubleshooting steps required to address this issue. Your assistance in resolving this matter would be highly appreciated.

Thank you for your attention and support.

Sincerely,
Goutham

@IntegrationSupport please resolve this query ASAP

Dear @goutham,

Here is the correct flow of scan and share APIs: https://sandbox.abdm.gov.in/docs/build_hip_share_patient_profile1.0

Kindly Share the request and response of the /v1/patients/profile/share API and /v1.0/patients/profile/on-share API.