Authentication
An access token is required for utilizing the TES APIs. To obtain this token, it's necessary to make a POST request to the TES OAuth Authentication endpoint đź”— TES OAuth Authentication with the following body:
{
"username": "INTEGRATION_USERNAME",
"password": "INTEGRATION_PASSWORD",
"client_secret": "INTEGRATION_SECRET",
"client_id": "integration",
"grant_type": "password",
"scope": "integration"
}
Replace INTEGRATION_USERNAME, INTEGRATION_PASSWORD, and INTEGRATION_SECRET with the actual credentials you have been given by TES.
The response body would be like:
{
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjdBNzIxNjZFMjcyRDY1Q0",
"expires_in": 10800,
"token_type": "Bearer",
"scope": "integration"
}
Once you successfully submit the request to the TES OAuth Authentication endpoint with the updated body containing your provided credentials, you will receive a response containing the access token. This access token serves as the key to access TES APIs securely. The response will include additional information such as the token's expiration time, its type (Bearer), and the scope for which it's valid, which in this case is “integration”. It's essential to store and utilize this access token in your API requests, as it acts as your authentication token for interacting with TES services. This process ensures that only authorized users with valid credentials can access and utilize TES APIs, maintaining the security and integrity of the system.
Integration Sample​
You can access the samples here.