Almost all responses contain DeviceToken, AccessToken and RefreshToken. We are currently in transition period of moving to a new platform. The existing platform already operates both with DeviceToken and AccessToken. We strongly recommend to store all three tokens to smoothly switch between platforms in the nearest future.
After registration you will receive accessToken with JWT and refreshToken. Use JWT token for user's authorized requests. JWT token has a lifetime. After this period - it expires. When your JWT token is expired you should refresh your token.
Here you can find information about how JWT works: https://jwt.io/introduction/
We will support the old platform till November 01, 2021 and keep inform all our clients about progress and required steps.
To get and manage data of individual user you need to authorize with user's deviceToken (or JWT token in some cases), user's InstanceID and InstanceKey.
To get and manage consolidated and accumulated data of user groups and all other users separately from your back-end, you need to authorize in API as admin with API Authorization Credentials.
Authorize as Admin with API Authorization Credentials
InstanceID: API InstanceID
Login: API Login
Password: API Password
API Authorization Credentials
Please, follow to your Management page in DataHub and generate API Authorization Credentials. Use provided credentials to get access to API.
If you do not have access to Management page - please, ask your colleague with a Company Access to DataHub to provide you with these credentials.
API Authorization Credentials
post
https://user.telematicssdk.com
/v1/Auth/Login
Authorization
Format of body request
Authorize as user
1
{
2
"LoginFields": {deviceToken: "deviceToken"},
3
"Password": "InstanceKEY"
4
}
Copied!
Authorize as Admin with API Authorisation Credentials
1
Authorize as Admin with API Authorization Credentials
Once you Log in and get credentials for further actions you have to be authorized. Please use Open Auth authorization.
Use "Authorization": "Bearer {Token}" // requiredin header for any method when authorization required.
{Token} - the JWT token that you get in /v1/Auth/Login response method.
We recommend keeping both AccessToken and Refresh token and set a schedule to refresh AccessToken to get seamless access to telematics platform, APIs and services
For security purpose the API will accept any value with no error message. However, if you use incorrect value, you won't be able to get information from sensitive API.