•   almost 5 years ago

Not able to access locator sdk api

Hello,
I followed all the steps for signing up for HealthCare Locator Software Developer Kit (SDK) account. And I did get an api key for Javascript project.
Now when I try to use it, I am always getting this error:
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}

I have tried using the sample app and the ui app from here : https://github.com/hcl-sdk/HealthCareLocatorWebSDK. And still get the same error as above.
Could you please help in how to move forward on this ?

  • 10 comments

  • Manager   •   almost 5 years ago

    Hi Amit,
    We do apologies for the inconvenience.
    The Application name you entered on our web site is Covid19-Hack. Correct?

  •   •   almost 5 years ago

    Yes, it is

  • Manager   •   almost 5 years ago

    Hi Amit,
    Can you retry?
    It should be OK now.
    All the best.
    OC

  •   •   almost 5 years ago

    Hello,
    I just tried again, still the same error.
    Its making the call to this url: Request URL: https://apim-dev-eastus-onekey.azure-api.net/api/graphql/query
    in the web-ui project.
    I get a 401 error code.

  • Manager   •   almost 5 years ago

    Hi Amit,
    The url you should use is https://api.healthcarelocator.com/api/graphql/query
    The example in github contains a reference to our internal dev service that is not reachable.
    Emmanuel

  •   •   almost 5 years ago

    "The Application name you entered on our web site is Covid19-Hack. Correct?"

    Where does it say this is required???

  • Manager   •   almost 5 years ago

    Hi John,
    This is not required. This is the name Amit gave to his app.
    All the best.
    OC

  •   •   almost 5 years ago

    Hey Team,

    The Javascript WebSDK makes an call to https://apim-dev-eastus-onekey.azure-api.net/api/graphql/query which was responding with 200 until recently we receive CORS error, how should we change this endpoint to https://api.healthcarelocator.com/api/graphql/query within SDK, is there any config file/ parameter we can initialize in HCL SDK API ?

    and if possible could you share an example to query GraphQL endpoint for sample data.

  •   •   almost 5 years ago

    Hi Deepak, I encountered the same CORS error as well. Have you successfully worked around this issue?
    Thanks in advance!

  •   •   almost 5 years ago

    FYI, I got the CORS issue resolved by creating a new account to receive a new apiKey and use it in my app.

Comments are closed.