We’ve got set up with trust and GP roles in the INT environment, and are now getting our code that worked in the sandbox to retrieve referrals sent to the trust in INT.
No matter what I do I seem to get a 401 error back from the query. I don’t think this can be a problem with the auth token, as it worked OK querying the sandbox.
I wonder if our API token needs to be granted access to our INT trust / service ? Our ERS service id that we set up in the trust is 6711327
Our most recent correlation id was 92c64e6e-b59c-43f3-9648-c112dd11c7f8
Thanks for the detail so far, there are a couple of things that i believe would help us investigate further:
Could you share the full request headers you’re sending? This will help us rule out any formatting issues on the auth token and confirm all the required NHS headers are present.
Have you explicitly contacted england.nhserspartners@nhs.net to request that the relevant e-RS interactions are added to your INT application (app ID: 476f2265-5f93-4379-8472-571a36dbb459)? This doesn’t happen automatically when moving from sandbox to INT, and is a common cause of exactly this kind of 401 with no response body.
There are no problems I can see with the Headers and Body, I think for now it is best to wait to hear what the partners come back with. Apologies for the inconvenience caused.
Hi both, I’ve checked the application 476f2265-5f93-4379-8472-571a36dbb459 and it is set up correctly for e-RS - Application-restricted. I can also confirm the ASID linked has the latest e-RS interactions.
I think I may have had the wrong iss/sub in the JWT payload sent to https://int.api.service.nhs.uk/oauth2 to get a bearer token. I’ve re-copied from the developer portal, and things are a lot healthier.
Thanks for helping to rule out a bunch of other things.
Is the security modal going to be the same for live, so once we’ve completed the onboarding all we need from a partner trust is their eRS service ID to retrieve work lists ?