Retrieve a token in your server

Learn how to get a client credentials grant using our auth server to make requests to the Payments API.

Use our authentication server to obtain a client credentials grant. You will need to use this in your requests to the Payments API.

Unlike our Data API, this grant doesn’t represent a user, but an instance of a client creating a payment.

curl -X POST \
    -d grant_type=client_credentials \
    -d client_id=${client_id} \
    -d client_secret=${client_secret} \
    -d scope=paydirect \
    https://auth.truelayer-sandbox.com/connect/token

Response will be

{
  "access_token": "JWT-ACCESS-TOKEN-HERE",
  "expires_in": 3600,
  "token_type": "Bearer"
}

Did this page help you?