After granting the consent for health data on my PHR app, I’m receiving consentArtefacts IDs on my url at this endpoint
Getting consentArtefact on this
When i use this consentArtefact IDs for fetching data from this endpoint
requesting data for a consentArtefact ID from this URL
curl request is -
curl --location --request POST ‘https://dev.ndhm.gov.in/gateway/v0.5/health-information/cm/request’
–header ‘accept: /’
–header ‘X-CM-ID: sbx’
–header ‘Content-Type: application/json’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2NzYzNTgxNzAsImlhdCI6MTY3NjM1NzU3MCwianRpIjoiMWMzMjFiYjktOGY4ZS00N2E0LThiYzctMTdmOWU5MTZiZjhjIiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJhZTY3NjIyMS03YTE4LTQ2ZDAtODZmYy03MGU2NmYxNGUwYWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJTQlhfMDAwMjM3Iiwic2Vzc2lvbl9zdGF0ZSI6Ijc1Njk0NDFjLTM3MDgtNDNmMy1iNzgxLTU3MGVlNjhlNTlmZSIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImhpcCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IlNCWF8wMDAyMzciOnsicm9sZXMiOlsidW1hX3Byb3RlY3Rpb24iXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJjbGllbnRIb3N0IjoiMTAuMjMzLjY5LjExIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJjbGllbnRJZCI6IlNCWF8wMDAyMzciLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzZXJ2aWNlLWFjY291bnQtc2J4XzAwMDIzNyIsImNsaWVudEFkZHJlc3MiOiIxMC4yMzMuNjkuMTEifQ.KpPwru4UrOWRIw6NSFhplufllIfSMrEgRFGNIYh60VWJ4upalUg0pJkZJC0OPyzZfNffkNnriy52CPqe4rGAsB3Iga6o8Ghxq69DC_-TRTHCBUrqIyr_GgZinvvZcPHETtL1JRbTeV0IoHwfuHcEWuiL1R4KLUX0xkna4BCCKGi-GWc_UGCauTpYawHLLtrnPSrLAfz2NLbELRB0DsPGXXVZbjyyK0TXg6oKGfWRrOEKtTUrg4HKhsUN8CoW2r0VJPzsNHTHjbFoU5RYe-nYUZng6XFz9rIfgpWjpTQnyM02h_ZiYLExQNosWjbZkznVAZGrjRFm7CtpOmC6Cubocg’
–header ‘Cookie: TS01960242=01445fed043a54ce003b7a2b492899bd6b0f10b0b35ad1c612f316ccb79ab0b79cd5cd5de30a12d705effd5cc80fbdc2532da55196’
–data-raw ‘{
“requestId”: “27dd91f9-33ac-47d2-9849-2df9c808cbdc”,
“timestamp”: “2023-02-14T06:58:01.533000”,
“hiRequest”: {
“consent”: {
“id”: “ce89a599-b278-481a-b8b4-5b7952b1720c”
},
“dataPushUrl”: “https://webhook.site/01f527bf-0ee3-4f44-91bc-1b10e9bd7532/push-data-here”,
“keyMaterial”: {
“cryptoAlg”: “ECDH”,
“curve”: “Curve25519”,
“dhPublicKey”: {
“expiry”: “2023-06-16T15:29:30.029Z”,
“parameters”: “Curve25519/32byte random key”,
“keyValue”: “Ayn3OfU1VV4NezwhqEDd2rPjo9HNglwYftRmQxziJneg”
},
“nonce”: “nLNxuOCgnDsd0ibzvbU90qmWXLdhquju2ab8JEdw+io=”
}
}
}’
Instead of getting encrypted data that i used to get before , i’m just getting data requested response for all the consent artefact IDs, I’m using the correct key and nonce generated from that java code