Hi,
I’m implementing the flow where user scans a QR code to share is Profile details with the HIP.
As a HIU, we are trying to implement the following endpoint but getting 401 always.
/gateway/v0.5/patients/profile/share
I tried passing the session token that we get on creating a session and also tried the X-Tokekn that we get after user logs in. Both gave 401 Unauthorized
Please let us know what are we doing wrong?
Payload values have been modified before pasting.
Request
curl --location --request POST 'https://dev.ndhm.gov.in/gateway/v0.5/patients/profile/share' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI0Ni0wMjA1LTg1NTYtNjgxNyIsImNsaWVudElkIjoiU0JYXzAwMDMyNCIsIm1vYmlsZSI6Ijk5NzA1MjA3MjIiLCJoZWFsdGhJZCI6ImJvYnRoZWJ1aWxkZXJAc2J4IiwiZXhwIjoxNjQ0OTE3MTIwLCJoZWFsdGhJZE51bWJlciI6IjQ2LTAyMDUtODU1Ni02ODE3IiwiaWF0IjoxNjQ0OTE1MzIwfQ.G90i3Rlu9_yw_sryX6mH49MgatInIzaQYCHzQczUpVTNerVMdLF-W3Y8BgsRAD3EK6FaEv31F4CuF-jru9akUdw14igP1jnyGDW0UqYst2_v4eFWfMNj_tTRi9ng-zM_KTHSNuUJo4Kaaft3RyslyUj0yypzyGTx_X2KNB8Vg0x3HBw_skJsG0fPDG47v7ZKvMoFEAWIgaAj-DJpjHmVM18cRWMeoFNrDApS7ogxunZeaXVvKVedAYs1v7ma1J2_8i9Vtr9z23X8grlT55CKJtDVFLDPSpSPkvZbdQU5WC8vKFCJS9th6eSFQGVrYmqr8nPvQUfERGfKAv9_m_7TfWT3cCqUwGygA21ZqtKRHzHFdJ-alpST25tLbqvjfy_-ReXqVjuosDoi8b2-PUZV1BSLiIWDk-vWF0CVBjnYNnPjyUv5FgkwYYCxP_B8JsaPZwMyPiXRz2AobnGSkqMYg5OXYHnn8qHKeRQCFGC4UxMO4QF2QXQw4p_0bnUtOl2dTPmGEhT8vxWloeGbUWVlXLsZtrHzNSHhAVutiI1_VRvjS11lo_z7S5i0BB6AoecUAoolAr0iJ-06rZfaSzozHvv4IYVZYa2ELo_zwhmOuWkhYxGAsXMriTy13gY-b_HkMTc6WPh-6CM5vUrbKEl88Q3cFuFDSAWwIYipy4Ce3u8' \
--header 'Content-Type: application/json' \
--header 'X-HIP-ID: InformDS' \
--data-raw '{
"requestId": "9c675b12-711f-45c2-973f-48940c89d58e",
"timestamp": "2022-02-15T09:09:19.194Z",
"profile": {
"hipCode": "Dept Id",
"patient": {
"healthId": "bobthebuilder@sbx",
"healthIdNumber": "46-0205-8556-6817",
"name": "Ayush Kumar",
"gender": "M",
"address": {
"line": "some valid string",
"district": "some valid string",
"state": "some valid string",
"pincode": "934001"
},
"yearOfBirth": 1996,
"dayOfBirth": 1,
"monthOfBirth": 1,
"identifiers": [
{
"type": "MOBILE",
"value": "+919970520722"
}
]
}
}
}'
Thanks,
Ayush