Personal Demographics Service - FHIR API - Application-restricted API authentication failure

Hi,
I could not authenticate to Personal Demographics Service - FHIR API - Application-restricted API by my API Key. Although i can authenticate to “Hello Application” with my API Key.
I tried to add the Api Key to header and to query params both. I got the same error.
I enabled the “Personal Demographics Service - Application-Restricted (Integration Testing)” service at my application. My application’s environment is “Integration test”
The error is;

“resourceType”: “OperationOutcome”,
“issue”: [
{
“severity”: “error”,
“code”: “forbidden”,
“details”: {
“coding”: [
{
“system”: “https://fhir.nhs.uk/R4/CodeSystem/Spine-ErrorOrWarningCode”,
“version”: “1”,
“code”: “ACCESS_DENIED”,
“display”: “Access Denied - Unauthorised”
}
]
},
“diagnostics”: “Invalid access token”
}
]
}

This is the url that i want to connect.
https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9449306621

Could you please help me for authenticate to the integration testing environment.

Kind Regards,
Tuğçe

Hi Tugce,

The PDS- FHIR API is RESTful and as such I would refer you to PDS -FHIR Application-restricted RESTful API authentication page. You need to follow the steps highlights on that page

Just so you know, if you create multiple applications to test across multiple test environments, you also need a different key pair and KID for each environment.

I hope this helps