Register a new SDK user API

:zap: API Reference: Register a new SDK user


The method is described in the part SDK log in and API Authentication

It generates a unique DeviceToken that you store in your Database and link to your user details. The DeviceToken is a unique key that you use across all our services.

Response

{
  "DeviceToken": "",
  "AccessToken": {
    "Token": "string",
    "ExpiresIn": 0
  },
  "RefreshToken": "string"
}

Where

DeviceToken - unique user ID
AccessToken - JWT access token for API access
ExpiresIn - JWT access token lifetime.
RefreshToken - a token that is required for JWT access token update after the last one expired.

Empty Body

By default, you can use an empty body to generate a DeviceToken.

curl --request POST \
  --url https://user.telematicssdk.com/v1/Registration/create \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'InstanceId: UUID ' \
  --header 'InstanceKey: UUID ' \
  --data '{}'

Extended body

For your convenience, you can add user details, including Client ID, and other user details. all these fields are searchable in DataHub

curl --request POST \
  --url https://user.telematicssdk.com/v1/Registration/create \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'InstanceId: UUID' \
  --header 'InstanceKey: UUID' \
  --data '
{
  "UserFields": {
    "ClientId": "ClientID"
  },
  "Email": "",
  "Phone": "",
  "Nickname": "",
  "LastName": "",
  "FirstName": ""
}
'