Client Credentials
Client Credentials Flow
+---------+ +---------------+
| | | |
| |>--(A)- Client Authentication --->| Authorization |
| Client | | Server |
| |<--(B)---- Access Token ---------<| |
| | | |
+---------+ +---------------+
Check out the detailed step-by-step tutorial here.
Token Request
POST /connect/token HTTP/1.1
Host: api.sandbox.treeconnect.abundancebrasil.com.br
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&client_id={{your_client_id_here}}&client_secret={{your_client_secret_here}}
curl -X POST \
https://api.sandbox.treeconnect.abundancebrasil.com.br/connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id={{your_client_id_here}}' \
--data-urlencode 'client_secret={{your_client_secret_here}}'
Token Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "xY9aZbC8wD7eF6gH5jK4lM3nO2pQ1rT0uV5iW4zX7cY8bA6vN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2t",
"token_type": "Bearer",
"expires_in": 3599
}
{
"access_token": "xY9aZbC8wD7eF6gH5jK4lM3nO2pQ1rT0uV5iW4zX7cY8bA6vN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2tG5eF8aB6cN3mH9jK2lM4nB8vC5xR2t",
"token_type": "Bearer",
"expires_in": 3599
}
Updated over 1 year ago