API Authorization

Get access to Telematics API

Authorization methods are located in User-service.

Authorization Types

API Services with authorization required

Authorization type

How to authorize in API

Authorize as User

InstanceID: User Group InstanceID

Login: User DeviceToken

Password: User Group InstanceKEY

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

Authorization

POST https://user.telematicssdk.com/v1/Auth/Login

The method allows to log into API and get access to sensitive information Authorization: Allow Anonymous

Headers

Name
Type
Description

InstanceID

string

User Group Instance ID or API Instance ID

Request Body

Name
Type
Description

LoginFields

string

User deviceToken or API Login

Password

string

User group Instance Key or API Password

{
  "Result": {
    "DeviceToken": "String",
    "AccessToken": {
      "Token": "String",
      "ExpiresIn": 1209600 // milliseconds
    },
    "RefreshToken": "String"
  },
  "Status": 200,
  "Title": "",
  "Errors": []
}

Format of body request

Authorize as user

{
  "LoginFields": {deviceToken: "deviceToken"},
  "Password": "InstanceKEY"
}

Authorize as Admin with API Authorisation Credentials

Authorize as Admin with API Authorization Credentials
{
  "loginFields": {"Email":"[email protected]"},
  "password": "Password"
}

curl Request:

curl -X POST “
https://user.telematicssdk.com/v1/Auth/Login”
 -H “accept: /” -H “InstanceId: “String” -H “InstanceKey: “String” -H “Content-Type: application/json-patch+json” -d “{\“loginFields\“:{\“Email\“:\“[email protected]\“},\“password\“:\“P@ssword\“}”

curl -X POST “https://user.telematicssdk.com/v1/Auth/Login” -H “accept: /” -H “InstanceId: “String” -H “InstanceKey: “String” -H “Content-Type: application/json-patch+json” -d “{\“loginFields\“:{\“Email\“:\“[email protected]\“},\“password\“:\“P@ssword\“}”

Authorization via Swagger

Swagger: https://user.telematicssdk.com/swagger/index.html

Login

Request

Please have API's InstanceID ready

Response

{
  "Result": {
    "DeviceToken": "String",
    "AccessToken": {
      "Token": "String",
      "ExpiresIn": 1209600
    },
    "RefreshToken": "String"
  },
  "Status": 200,
  "Title": "",
  "Errors": []
}

Autorization

Please add Bearer JWT to authorization form.

Example of format

Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJiOTA5MDNkZi1iOWExLTQ3MzQtOWI1Yi02MDJkZGFiNmYwNmUiLCJqdGkiOiIzOGEyZmZmNi1kNmVkLTRjZGItOTRjMi1mOTk5NzIzYWUyYzMiLCJpYXQiOjE1ODQ0NTQ1MDcsIkFwcGxpY2F0aW9uSWQiOiIyMSIsIkRhdGFIdWJFbWFpbCI6ImFuZHJpeS50dXBjaGllbmtvQHJheGVsdGVsZW1hdGljcy5jb20iLCJJbnN0YW5jZUlkIjoiYThlN2I3M2YtNTA4Yi00OWNlLWFmNTItNGMwZTYwNzAxMTM2IiwiSW5zdGFuY2VLZXkiOiI2MjY5N2RiNi0xZjA1LTRlYmMtOTYzMC1iODg3MmIxNDJlMTIiLCJEZXZpY2VUb2tlbiI6ImI5MDkwM2RmLWI5YTEtNDczNC05YjViLTYwMmRkYWI2ZjA2ZSIsIkNvbXBhbnlJZCI6IjM5IiwiSXNEYXRhSHViVXNlciI6IlRydWUiLCJuYmYiOjE1ODQ0NTQ1MDcsImV4cCI6MTU4NTY2NDEwNywiaXNzIjoid2ViQXBpIiwiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDo1MTM3NCJ9.Cy2c_FowBg4Ts1aPsKILn5-uI8NcY9dVIB4w9f8a8rY

Last updated

Was this helpful?