HelloWorld API returning error from open-access endpoint

Error message when using - “Hello world!” API from open-access endpoint: Hello World API - NHS Digital

Undocumented Failed to fetch.
Possible Reasons:

  • CORS
  • Network Failure
  • URL scheme must be “http” or “https” for CORS request.

Hi Ian. The “Hello World” API is the only sandbox API that actually has authentication in front of it, because this API exists to demonstrate the different Authorisation models that we support. This is very likely the reason for your error.

An example of a Sandbox API without authentication on is the “Personal Demographics Service”, for example the “Get patient details” endpoint at Personal Demographics Service - FHIR API - NHS Digital

You’ll be able to get a Sandbox response from this (for the fictional “Mrs Jane Smith MBE”) without authentication.

Thank you for your reply. I was trying the open access endpoint which shouldn’t require authentication should it?

Ah yes! There is an error in the URL, which we will fix. Basically, the “/specification/” part is wrong.

If you just call: curl -X GET https://sandbox.api.service.nhs.uk/hello-world/hello/world then you should get the documented response.

Or https://sandbox.api.service.nhs.uk/hello-world/hello/world from a browser.

1 Like

That’s working now. Thanks!

2 Likes