Searching for doctors in sandbox

I am using the URL
https://doctorsbx.abdm.gov.in/apis/v1/doctors/search-doctors
with body (as in example)
{
“practitioner”: {
“id”: “”,
“name”: “Akshat”,
“contactNumber” : “”,
“state”: “”,
“registrationNumber” : “8732323”
}
}

to get doctor details in Postman but the response is 401Unauthorized
I am using a new token from
https://dev.abdm.gov.in/gateway/v0.5/sessions

Please allow access to those APIs if it is not done yet

“clientId”: “SBX_002414”
@IntegrationSupport

Hi,
Is there any solution for this ?

Hi @drsganesh,
Please check Auth Token is filled in Test field or not. After this facing Issue let us know
var jsonData = pm.response.json();
pm.globals.set(“Auth_Token”, jsonData.accessToken);

Thanks

Auth Token is filled
Below is the Javascript code (CORS handled and client credentials replaced)
It returns 500, internal server error

let hHeader = new Headers();
hHeader.append(“Content-Type”, “application/json”)
let hR = await fetch(“https://dev.abdm.gov.in/gateway/v0.5/sessions”, {
method: “POST”,
headers: hHeader,
body: JSON.stringify({
“clientId”: “SBX_XXXXX”,
“clientSecret”: “xxx”
})
})
const jR = await hR.json()
const accessToken = jR.accessToken;// I am getting a valid token

let oQBody = {
    "practitioner": {
        "id": "",
        "name": "Akshat",
        "contactNumber": "",
        "state": ""
    }
}

let hHeaderQ = new Headers();
hHeaderQ.append("Content-Type", "application/json")
hHeaderQ.append("authorization", "Bearer " + accessToken)
const hRQ = await fetch("https://doctorsbx.abdm.gov.in/apis/v1/doctors/search-doctors", {
    method: "POST",
    headers: hHeader,
    body: JSON.stringify(oQBody)

})
let jRQ = await hRQ.json()
console.log(jRQ)

I am having the same error. It is giving 401 unauthorized error when I run search-doctos. @IntegrationSupport please look into this problem.

Please share your email id and contact number so that we can get in touch with you for resolution.
Thanks

My email id is
drsganesh.in@gmail.com

I have tried to search doctors as per the samples provided at https://sandbox.abdm.gov.in/docs/search_hspa_doctor

search request getting failed with error 500 Internal Server Error,

generate new access token each time and passed

curl --location --request POST 'https://doctorsbx.abdm.gov.in/apis/v1/doctors/search-doctors' \
--header 'authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI....................' \
--header 'Content-Type: application/json' \
--data-raw '{
            "context": {
                "domain": "uhi:consultation",
                "country": "IND",
                "city": "std:080",
                "action": "search",
                "core_version": "0.7.1",
                "bap_id": "exampleapp.io",
                "bap_uri": "https://api.exampleapp.io/uhi/v0/",
                "message_id": "5ac3dd78-829e-4c7d-9139-a15adbb582cc",
                "timestamp": "2021-03-23T10:00:40.065Z"
            },
            "message": {
                "intent": {
                    "provider": {
                        "descriptor": {
                             "name": "Victoria Hospital"
                         }
                    }
                }
            }
         }'

Response: 500 Internal Server Error
An Internal Server Error Occurred

any help in this regard is appreciated.

Please share your connect details, we will reach out for a virtual meeting to help with resolution.

@drsganesh : we shared the meeting details with you on your email id - drsganesh.in@gmail.com
Kindly revert in the email or may respond on this thread. Kindly tag @IntegrationSupport

@IntegrationSupport I am facing the same 401 issue. Any Solutions?

Please share payload body and postman screenshot and email us at integration.support@nha.gov.in

I have Sent the mail @IntegrationSupport

@IntegrationSupport any updates?

facing the same issue, any solution for the same?