
OAuth2
Some of our APIs use OAuth2 flows to authenticate the requests. Below you will find further instructions of which APIs and how to use the credentials.
Postcode V2 Test and Postcode V2 Prod
The v2 of our postcode APIs use OAuth2 with client_credentials flow for authentication. That means you will need the following to request an access_token:
client_id
client_secret
grant_type:
client_credentialstoken_url: https://login.microsoftonline.com/aa8f6f48-5c58-40f7-b8c8-02b0cb9a6183/oauth2/v2.0/token
scope
For test:
api://f49bd16b-c838-4c96-b28e-2d7bc9dc1dcf/.default
For prod:
api://b8462095-467c-472b-8ed3-a6faa4b07d0d/.default
The client_id and client_secret credentials will be provided to you by someone from The Sustainables when working on the integration.
Requesting an access token
A request to retrieve an access token will look like the following:
The expected response is:
The given access_token can then be used to authenticate the requests to the API via the Authorization header: