Test pack for Integration Test environment

Hi Team,

We are working on the User restricted authentication to access the NHS REST Apis ( following steps in this User-restricted REST API tutorial - NHS Digital)

As we are waiting for the NHS smartcards to use INT TEST environment, we are currently working with sandbox environment , that don’t need smart cards and can support simulated authentication.

As suggested in above documentation, Simulated authentication page gets displayed when this URL is loaded : https://sandbox.api.service.nhs.uk/mock-nhsid-jwks/simulated_auth?client_id=gRGN53KNVKAilmeL5t3OdvATTDKPAcup&redirect_uri=https%3A%2F%2Fdigital.nhs.uk%2Fapi-spec-try-it-now%2Foauth-redirect&response_type=code&scope=nhs_login&state=FPs0kNFesZqjBVagK9B7iIp2ic-G-e2ggTUS

We selected smart card (radio button) and clicking on sign in , redirected to this url : https://sandbox.api.service.nhs.uk/oauth2/callback?code=f6a9e989-c6c0-4cfa-9475-abf597476519&state=FPs0kNFesZqjBVagK9B7iIp2ic-G-e2ggTUS&client_id=some-client-id

And Json response returned is : {
“error”: “invalid_request”,

      "error_description": "Invalid state parameter.",

      "message_id": "rrt-4995145636691281930-c-geu2-31789-19662426-1"


Could you please check and advise in case anything missed from our end please.

Looks like the link has the wrong client_id in it. One of the steps states the following::

Replace clientId and clientSecret with the credentials given to you from your new app created in the guide above. Please note that client_id is the API Key.

Change it to your API key, and see if that works?