This section will guide you through the essential steps to integrate your third-party platform with our APIs. By following these steps, you will be able to register as a Third Party Provider (TPP), generate necessary tokens, and establish secure communication with our services.
Register as a Third Party Provider (TPP)
To begin integrating with Leatherback, you need to register as a Third Party Provider (TPP). This registration process involves making an API call to our registration endpoint.
API Endpoint: /api/v1/tpp/register
Method: POST
Request Headers:
Content-Type: application/json
Request Body:
Code Block | ||
---|---|---|
| ||
{
"organizationName": "Your Organization Name",
"contactEmail": "contact@example.com",
"redirectUri": "https://your-redirect-uri.com/callback"
} |
Sample Request:
Code Block |
---|
curl -X POST "https://api.leatherback.com/api/v1/tpp/register" \
-H "Content-Type: application/json" \
-d '{
"organizationName": "Your Organization Name",
"contactEmail": "contact@example.com",
"redirectUri": "https://your-redirect-uri.com/callback"
}' |
Response:
Code Block | ||
---|---|---|
| ||
{
"tppId": "unique-tpp-id",
"status": "registered"
} |
Generate a Client Token
Once registered as a TPP, the next step is to generate a client token. This token is necessary for authenticating subsequent API calls.
API Endpoint: /api/v1/auth/generate-client-token
Method: POST
Request Headers:
Content-Type: application/json
Request Body:
Code Block | ||
---|---|---|
| ||
{
"tppId": "your-unique-tpp-id",
"clientSecret": "your-client-secret"
} |
Sample Request:
Code Block |
---|
curl -X POST "https://api.leatherback.com/api/v1/auth/generate-client-token" \
-H "Content-Type: application/json" \
-d '{
"tppId": "your-unique-tpp-id",
"clientSecret": "your-client-secret"
}'
|
Response:
Code Block | ||
---|---|---|
| ||
{
"clientToken": "generated-client-token",
"expiresIn": 3600
}
|
Create Client Consent
After generating a client token, the next step is to create client consent. This step involves generating a consentId in our systems so we can tie consent requests to you as a TPP.
In this tutorial, you create a consent for any of the following available permissions:
Permissions | Dependencies |
---|---|
ReadAccountsBasic | None |
API Endpoint: /api/v1/consent/create
Method: POST
Request Headers:
Content-Type: application/json
Authorization: Bearer {clientToken}
Request Body:
Code Block | ||
---|---|---|
| ||
{
"Data": {
"Permissions": [
"ReadAccountsBasic",
"ReadAccountsDetail"
],
"ExpirationDateTime": "2020-12-02T00:00:00+00:00",
"TransactionFromDateTime": "2020-09-03T00:00:00+00:00",
"TransactionToDateTime": "2020-12-03T00:00:00+00:00"
},
"Risk": {}
} |