---
title: "Obtain Aggregated FHIR Token"
canonical: "https://wiki.patientsknowbest.com/space/api/4513202208/Obtain%20Aggregated%20FHIR%20Token"
format: markdown
---
> Macro (excerpt)
> 
> - Using OAuth2.0 obtain a token for the endpoint.  The following parameters are required to make the call.
>   - Aggregated FHIR client id and client secret are provided to you by PKB once a date for development has been agreed upon.
>   - Endpoint: [https://oauth2.sandbox.patientsknowbest.com/api/oauth/token](https://oauth2.sandbox.patientsknowbest.com/api/oauth/token)

> Macro (excerpt-include)

> Macro (excerpt-include)



<u>Example</u>

> Macro (excerpt-include)




> Macro (excerpt-include)




> Macro (excerpt)
> 
> - You must have an identifier (national id or PKB public id) for the patient.  If you don’t already have an identifier, see the [Patient demographic retrieval](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/4504551428) page.
> - You must have [access to the data in the patient’s PKB record](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/4491968591).
>   - The patient’s PKB record must be in your PKB organisation.
>   - You must have access to the relevant privacy labels within the patient’s PKB record.
> - [Obtain an access token to the Aggregated FHIR endpoint](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/4513202208).