Attention: Our API is in active development. Please ensure to read our Development Notice for important information on potential changes and updates. We appreciate your understanding.
Authentication
All TBInt APIs require an access token for access and consumption. Access tokens are provided in the HTTP header of every API request. The header field is called 'accessToken'.
For instance: accessToken: your-access-token
It's important to note that access tokens are environment-specific. This means that a token generated in the Sandbox environment cannot be used in the Production environment, and vice versa. For example, to access the Sandbox API, you would need a token generated via the Sandbox login. Similarly, the Production API requires a token that has been generated by the Production login.
This approach enhances security and ensures the correct access level is assigned to each environment. Please ensure that you are using the correct access token for the environment that you intend to interact with.
Each access token has a lifespan of 30 minutes. After this period, the token expires and a new one needs to be generated for continued access to the API.
Requesting a access token
Request an access token by sending a POST request to /login
Request
curl --location --request POST 'https://sandbox.tbint.io/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "username",
"password": "password"
}'
Please don't commit your credentials to the repository.
Authorizing requests
To authorize the request you must append the token to the accessToken header
Example request with an access token
curl https://sandbox.tbint.io/sales \
-H "accessToken: {token}"