Hi Team,
I am getting 401 unauthorised error for auto-approve api (https://dev.abdm.gov.in/cm/consents/auto-approve)
Steps followed:
- created session token
- used login api and got X-Token
- added the above tokens to auto-approve api header
- added HIU id to request body
- After sending request, i am getting 401 unauthorised error
REQUEST BODY
{
“isApplicableForAllHIPs”: true,
“hiu”: {
“id”: “HIU_555”,
“name”: “chithirai hospital”
},
“includedSources”: [
{
“hiTypes”: [
“DiagnosticReport”,
“Prescription”,
“DischargeSummary”,
“OPConsultation”
],
“purpose”: {
“code”: “PATRQT”,
“text”: “Self Requested”
},
“period”: {
“from”: “2020-11-01T12:54:21.896Z”,
“to”: “2029-11-03T12:54:21.896Z”
}
}
],
“excludedSources”: [
{
“hiTypes”: [
“DiagnosticReport”
],
“purpose”: {
“code”: “PATRQT”,
“text”: “Self Requested”
},
“hip”: {
“id”: “HIP_11”,
“name”: “Apollo hospital”
}
}
]
}
I dont know which part I missed. Could you please help me.
Thanks in advance