V1.0/patients/profile/on-share api not working

"CLIENT_ID": “SBX_000499”,

While calling ‘v1.0/patients/profile/on-share’ after we receive callback by gateway (/v1.0/patients/profile/share) the api returns error

**{HIP_HOST}}/v1.0/patients/profile/share
**
Response: 202

{
"requestId": "bd9f3df7-bf84-48fc-bd9d-f996673edd85",
"timestamp": "2023-03-02T12:00:03.545090495",
"intent": {
    "type": "Testing intent"
},
"location": {
    "latitude": "25.20590247",
    "longitude": "84.98542532"
},
"profile": {
    "hipCode": "12345",
    "patient": {
        "healthId": "suma3333331668@sbx",
        "healthIdNumber": "91-2188-5583-3081",
        "name": "Vivek Kumar Ranjan",
        "gender": "M",
        "address": {
            "line": "masked",
            "district": "masked",
            "state": "masked",
            "pincode": "masked"
        },
        "yearOfBirth": 1990,
        "dayOfBirth": 12,
        "monthOfBirth": 8,
        "identifiers": [
            {
                "type": "MOBILE",
                "value": "masked"
            },
            {
                "type": "NDHM_HEALTH_NUMBER",
                "value": "91-2188-5583-3081"
            }
        ]
    }
}

}

{GATEWAY_HOST}/v1.0/patients/profile/on-share
Request:

{
    "acknowledgement": {
        "tokenNumber": "12345",
        "healthId": "suma3333331668@sbx",
        "status": "SUCCESS"
    },
    "resp": {
        "requestId": "bd9f3df7-bf84-48fc-bd9d-f996673edd85"
    },
    "requestId": "d95ba243-4c12-46ee-9aa4-590807e4d140",
    "error": {},
    "timestamp": "2023-03-02T12:00:05.743246600"
}

Response:

  "error": {

        "code": 2500,

        "message": "resp.requestId is null or empty"

    }

@Shubhanshu_Shukla plse have a look

@IntegrationSupport, we are also facing same issue. Please response asap.

Hi @himanshu0502, @vivekkranjan

Did you get any resolution to this error. We are also facing error while sending callback to “/on-share” api.

Hi @preeti,

The flow for generating a token is that firstly, the user scans the QR Code and from that QR Code you will get HIPId (which you use in share APIs). On the next page, you have to show User Details and when the user clicks on the Share Button you have to run the below APIs("/v1/patients/profile/share") in response you will get a token that token you have to reflect to the user.

You can use the below CURL to generate a counter token:

curl --location ‘{{domain}}/v1/patients/profile/share’
–header ‘X-AUTH-TOKEN: Bearer eyJhbGciOiJSUzUxMiJ9.eyJwaW5jb2RlIjpudWxsLCJzdWIiOiJoaW1hbnNodXNpbmdoNTI5NkBhYmRtIiwiY2xpZW50SWQiOiJQSFItV0VCIiwicmVxdWVzdGVySWQiOiJQSFItV0VCIiwiZ2VuZGVyIjoiTSIsImRpc3RyaWN0TmFtZSI6IkdIQVpJQUJBRCIsIm1vYmlsZSI6Ijk5NTM0ODA5MzYiLCJmdWxsTmFtZSI6IkhpbWFuc2h1IFNzc0xpbmUiOiJDL08gQmFsd2FudCBTaW5naCBBbG1peWEgTS02NS1CIFNhbmpQiOjE2ODgzODU3NzgsInBockFkZHJlc3MiOiJoaW1hbnNodXNpbmdoNTI5NkBhYmRtIiwiZW1haWwiOm51bGwsInR4bklkIjoiY2I4NzA1YjgtZmUxYi00YjE0LTlkNTYtOWNjZDA2MThiNDJlIiwieWVhck9mQmlydGgiOiIxOTk2In0.lBJsZLpEHB5tX3H04D7e6DhC_AQo_U_RMPdJSF7k25psIkwIhPCL3kc-eYzaQijJUIs9Z7mS5jATpxrehY5UdeipNNplT_4kaD2RwhyAgWqOUhMpCxQZAKIFXaQ5Y3NoHqvLHWAZaIWflPlnamf0GhQolfH-grXnSO1e3iZRrab91eYGNnC9OF72aPSZ2pnRlEb6z61LsYMpt3woUFn58pOJ2PHBON27WNxkirngZDjX4aj3qAeAYZolXcTLZw7e8S9ZSbSOM2KUCsqcZZ8FDm2CNGMITnQyrvGbVHlbMdJSSohC5pEaI5vHRuvjg3Shdtfkwtl6bSovmYg5EBlwuQ’
–header ‘Content-Type: application/json’
–data ‘{
“requestId”: “3b06372c-bb0e-450d-9d0e-be14786c998d”,
“intent”: {
“type”: “REQUESTED”
},
“location”: {
“latitude”: “string”,
“longitude”: “string”
},
“hipDetails”: {
“hipId”: “IN3410000260”,
“code”: “12345”
}
}’

Hi @himanshu0502 yes we have already integrated the flow you mentioned above but when the HIP sends token in response it’s not reflecting in the PHR app instead of showing the token the app shows a error message attached below-

Please help us with this we are stuck here.

@preeti,

Try with this
{
“requestId”: “{{$guid}}”,
“intent”: {
“type”: “string”
},
“location”: {
“latitude”: “string”,
“longitude”: “string”
},
“hipDetails”: {
“hipId”: “IN0710000045”,
“code”: “3-18”
}
}

Here ‘{{domain}}’ represents which link, is callbackURL or BaseURL?
share API calls while user scans the QR code of Facility. We wrote share API with callback URL

This is the domainhttps://dev.abdm.gov.in/cm/” which we were using for the same
share API does not flow any callback URL in response we get the token which we have to display