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 this value 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=payments \
https://auth.truelayer-sandbox.com/connect/token
You will get a response like the following:
{
"access_token": "JWT-ACCESS-TOKEN-HERE",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "payments"
}
You can also test this with Insomnia using our guide.
Updated about 2 months ago
Did this page help you?