Care-contexts/discover 403 error

Hello,

Below is the curl I am using for the discover api, I am entering the transaction id from on-init response.
I am getting 403, Access Denied error

curl --location ‘https://dev.abdm.gov.in/gateway/v0.5/care-contexts/discover’ \

–header ‘X-CM-ID: sbx’ \

–header ‘Content-Type: application/json’ \

–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE3MDAxNTgzMDgsImlhdCI6MTcwMDEzNjcwOCwianRpIjoiY2EyMDQxNDUtMTA2Ny00MjdjLWEzM2UtMWY4ODVhZWFhZWZmIiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiI0MmZhN2E0Mi02NDE3LTRjZGItOGQwNi00NDEyZjI4N2MxZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJTQlhfMDAzNzcyIiwic2Vzc2lvbl9zdGF0ZSI6IjYxZjNmNDgxLWE4YTUtNDRjNy1hNGRhLTc4NGJjYWRkNDllYiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImhlYWx0aElkIiwiT0lEQyIsImhpcCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IlNCWF8wMDM3NzIiOnsicm9sZXMiOlsidW1hX3Byb3RlY3Rpb24iXX0sImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJjbGllbnRIb3N0IjoiMTAuMjMzLjcwLjIxNSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiY2xpZW50SWQiOiJTQlhfMDAzNzcyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoic2VydmljZS1hY2NvdW50LXNieF8wMDM3NzIiLCJjbGllbnRBZGRyZXNzIjoiMTAuMjMzLjcwLjIxNSJ9.NUsP3zo6161OXcHS2bzOeLoCXvhfIc8B6lRl3qLMLtfsSiKa6ojo0fGchfQt-P-WWi7wSpqec4dXoI4zDTUhwdJNfqy4igaaZ3hlPb6rKWXHiK79HJQa1z_BWs81u350abt765UGCl0tWEh3VFi6cVqWGqf9W7femanML8wAf7_CntG7qj_VOMGYiIKEcW0p8lGw_eO_3s5krz27LUhWbrUQxW4QQ0P5DNdgjyFF1CZ62VQCQTEeySHrSoKzX9RqKatsmIq_ouV82kv9CyjeBzVGfvm0NxTC8p8Ms_1wCDxxXTgpTrhdWLT2FALtk8798RaaGPm28g4Wep9fc5IqJg’ \

–data-raw '{

“requestId”: “345a998c-5cd9-473f-b7d8-1f5791ccc500”,

“timestamp”: “2023-11-16T12:30:24.340000”,

“transactionId”: “b17ec0a0-da99-4c21-9b0d-ea446c4f4331”,

“patient”: {

"id": "amit.sharma87@sbx",

"name": "Amit Sharma",

"gender": "M",

"yearOfBirth": 1986,

"verifiedIdentifiers": [

  {

    "type": "MOBILE",

    "value": "+91-MOBILE"

  }

],

"unverifiedIdentifiers": [

  {

    "type": "MOBILE",

    "value": "+91-9929688916"

  }

]

}

}’

Please correct me, I cannot move forward.

I am using the flow from the url:
https://sandbox.abdm.gov.in/abdm-docs/LinkCareContext

Hi
In discover api request payload, you have to generate a unique transaction id

Used the $guid in postman, Getting the Access Denied Error. below is the curl:

curl --location ‘https://dev.abdm.gov.in/gateway/v0.5/care-contexts/discover
–header ‘X-CM-ID: sbx’
–header ‘Content-Type: application/json’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUI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1NCJ9.RzsiqwfvcF-EKRwaHGwPCvk8ReC_VE0IQ7YpJxwUr_o9lLMpY8caXJOUDQKCaNUN6x4nZStGCEsuCOcc__uUD2NWljJCqxNXk1LvIXdf87yO61RxNWFguMOxq7yCIX35hEYTEpcafEsye7IE0Jh-LHdOBNr28lMA37o-mm5Bh4Gz6ENietBQvlrjbLPcFuoYBypFvm71-dKmof4QMlDr2Q7TMCxCy5PSv5-HlcfvRMBUfp6C_TXY3SVZtM7lhHXc8MMQKah3fzOEVRK36D2XSzVLUAq62qxAZxJnzWQlHiRIrgm5inaNb5a9-_Qrlsoi-7jO326LtkOmZTDfeOwAYA’
–data-raw ‘{
“requestId”: “7a445f7b-21dc-441f-ba5a-96188a57c956”,
“timestamp”: “2023-11-17T06:15:57.561000”,
“transactionId”: “71843571-33da-431c-9058-91eb797fed1c”,
“patient”: {
“id”: “amit.sharma87@sbx”,
“name”: “Amit Sharma”,
“gender”: “M”,
“yearOfBirth”: 1986,
“verifiedIdentifiers”: [
{
“type”: “MOBILE”,
“value”: “+91-9929688916”
},
{
“type”: “HEALTH_ID”,
“value”: “amit.sharma87@sbx”
},
{
“type”: “HEALTH_NUMBER”,
“value”: “{{Patient_Health_No}}”
}
],
“unverifiedIdentifiers”: [
{
“type”: “MOBILE”,
“value”: “+91-9929688916”
}
]
}
}’

@IntegrationSupport looping

Hi Amit,
Refer this sample payload


Doing the same, attaching the screenshot below:

Hi Amit,
In headers try using, X-HIP-ID (value should be your hip id) and Authorization

Hi,
I’ve tried with X-CM-ID & X-HIP-ID, in all combinations as headers, getting same 403 error

Hi Amit,
Might be some roles you are missing in Access token. Send a mail to integration support [abdm@nha.gov.in] to update roles for your Client ID

Hello Amit,
Attaching the screenshot from the profile, I guess i should have access to HIU, correct me if I am wrong

Hi Amit,
Can you share your question on my id: “amit.eu0183@gmail.com
later will publish all questions & associated answers here for forum benefits.

Sure, thanks for sharing email id

Hi
Also make sure, Connect header attribute must be set to Keep-Alive

Yes, the option is on Keep-Alive

Hi amits,
Is the issue fixed?