Telematics SDK | Developer portal
  • Get started
  • 4 Steps to Integrate SDK
  • Product Wiki
  • License
  • FAQ
  • PRODUCT DESCRIPTION
    • How it works
    • SDK Features
    • Scoring
      • Risk driving Scoring
        • Event detection
        • Trip rating
        • Overall scoring
      • Eco Scoring
    • Dataset
      • Dataset | User statistics API
      • Data samples
        • Summary - Processed track details (Rich track details)
        • Processed track waypoints (Rich track points)
        • Summary - list of Processed tracks
        • Incoming track events
        • Incoming track points (waypoints)
        • Summary - list of Incoming tracks
      • Dataset Decription
        • Bluetooth OBD - Vehicle Dataset
        • LastKnownPoints
        • IncomingTrackPoints
        • IncomingTrackEvents
        • Enriched telematics data
          • RichTracks
          • RichTrackPoints
          • RichTrackEvents
          • RichTrackDetails
          • UserStatisticDrivingDetails
        • Raw telematics data from SDK
    • Reporting
      • Drivecoins summary
      • Trip summary
      • Scoring summary
      • User state
      • Fraud
      • Trip waypoints
      • Trip events
    • External Articles
      • Why mobile telematics hits hardware telematics
  • Step 1: Create Datahub Account
  • Step 2: SDK Installation
    • Get started
    • iOS SDK installation
      • *Set up Your Development Environment
      • *Configure Your Project
      • *App Delegate
      • *Configure Framework
      • *React Native Installation
        • Create the iOS bridge
      • Add list of trips to your ViewController
      • Add statistics data to your ViewController
      • *What’s different in iOS 13?
      • *iOS 13 Permissions Wizard
      • *SDK Enable \ Disable \ Disable With Upload
      • *Incoming Tags
      • *Tracking Status
      • *SDK Delegates
      • *SDK Modes
      • *Using the Debugging Tools in Simulator
    • Android SDK installation
      • *Getting started
        • *Set up Your Development Environment
        • *Setup and enable SDK
        • *Permissions wizard
        • *Permissions dialog
        • *Configure SDK variables for notifications
      • *Subscribe to tracking events
      • *Incoming tags managing
      • *Migration from SDK v1.6.x to SDK v2.0.x
    • *Check SDK Installation
      • iOS Simulator
      • DataTool
      • ZenRoad
    • *Demo Applications
      • iOS | Open Source Demo Application
      • iOS | SDK Demo Application
      • iOS | Swift | SDK Demo Application
      • Android | SDK Demo Application
      • Android | Java | SDK Demo Application
      • Flutter | SDK Demo Application
    • SDK Changelog
      • Android SDK Changelog
      • iOS SDK Changelog
    • Permissions Guides
      • First Launch
        • iOS 13 (and higher) Permissions Guide
        • iOS 12 (and lower) Permissions Guide
        • Android 9 Permissions Guide
        • Android 9 XIaomi Permissions Guide
        • Android 10 Permissions Guide
      • *Troubleshooting
        • iOS — Troubleshooting
          • iOS — Troubleshooting
        • Android — Troubleshooting
          • Samsung — Troubleshooting
          • Oppo — Troubleshooting
          • Huawei — Troubleshooting
          • Xiaomi — Troubleshotting
          • OnePlus — Troubleshooting
          • Meizu — Troubleshooting
          • Asus — Troubleshooting
          • Vivo — Troubleshooting
          • Wiko — Troubleshooting
  • Step 3: Register SDK users
    • User Registration (API)
  • Step 4: API | User Statistics, Scores, Trips
    • Step 4: Get Statistics, Scorings and Trip Data
    • API Authorization
    • Statistics and Scoring APIs
      • Get started - Statistics and Scoring API
      • User | Individual Scorings and Statistics
      • Admin | User(s) - Scorings and Statistics
      • Admin | Consolidated Scorings and Statistics
    • Trips API
      • Get a short list of tracks
      • Get a list of tracks with paging
      • Get a list of tracks by IDs
      • Get a single track with waypoints
      • Get the most earliest track
      • Track Statuses
  • SDK Features
    • *Bluetooth Device - Get started
      • *Get Started
      • *Android - ELM API
      • *iOS - ELM API
    • Trip Tags - Get started
      • Tags for trips via mobile app
        • Android - Tags for trips
        • iOS - Tags for trips
      • Tags for period
      • Trip log by tags
  • PLATFORM FEATURES
    • *User Management
      • *User Registration
      • *Check User Existence
      • *User Management
    • *Vehicle Management
      • *Directories
      • *Vehicles
    • FNOL, Inspections & Damage Recognition
      • Get started
      • Profiles
      • Claims
      • Vehicle inspections
        • Dictionary of vehicle photos
      • Photo processing
    • *Leaderboard
      • *Summary Leaderboard
      • *Leaderboard by factors
      • Swagger - Leaderboard
    • *Streaks
    • *SNS
      • *How to register AWS SNS
    • 3rd party data processing
      • Swagger - Incoming getaway
    • *User & Permissions Status | Heartbeats
  • Other
    • Response Codes
    • Resources swaggers
      • Swagger: User service
      • Swagger: Scorings and Statistics API
      • Swagger: Telematics data
      • Swagger: Leaderboard
      • Swagger: Vehicle Management
      • Driving details
      • Swagger: FNOL, Inspections & Damage Recognition
      • Swagger: Heartbeats
    • Archive
      • Get started
      • Statistics and Scorings API
      • Step 5: Get statistics and trip data [ARCHIVED]
      • User Statistics API [Archived]
      • SDK - Statistics API [ARCHIVED]
        • Get the data to the Android app
          • Android Telematics data (Tracks)
            • Check current running track state
            • Get start date for current recording trip
            • Register tracking state listener (for onStartTracking/onStopTracking events)
            • Register speed violations listener
            • Get flag for registered speed violations listener
            • Get registered speed limit in km/h or default
            • Get registered speed violations timeout in ms or default
            • Get Tracks
            • Get detailed trips information
            • Get available user roles
            • Change a user role (any of TrackOriginDictionary.code)
          • Android User Statistics
            • Get Dashboard info
            • Get detailed Dashboard
            • Get Driving time statistics
            • Get Speeding statistics
            • Get Mileage statistics
            • Get Distracted Phone Usage statistics
        • Get the data to the iOS app
          • Other methods
          • iOS Telematics data (tracks)
            • Request all Tracks with specified offset and limit
            • Request all Tracks with specified offset and limit. No filter will be used in request
            • Request Track info with specified Track Token
            • Request Track origins dictionary
            • Change Track Origin Code
            • Share Track
          • iOS User Statistics
            • Get shared Track
            • Request main statistics data for all possible statistic types
            • NS_ENUM
            • Request main statistics data for all possible statistic types
            • Properties and Protocols
      • Get all DeviceTokens
    • Report a bug
    • Data Hub
    • Talk to sales
  • Postman collection
Powered by GitBook
On this page
  • Telematics parameters
  • Register a new user
  • Register multiple users
  • Refresh Token
  • RefreshToken

Was this helpful?

  1. Step 3: Register SDK users

User Registration (API)

Full stack of operations with users and users' profiles.

PreviousStep 3: Register SDK usersNextStep 4: Get Statistics, Scorings and Trip Data

Last updated 4 years ago

Was this helpful?

Please make sure you have InstanceID and InstanceKey ready. If not, please refer to the part of

Telematics parameters

User service enables managing user's telematics parameters. It can be set up during registration or changed later via method. This parameters will be used by default if you do not set up them manually.

Parameter

Description

"EnableTracking"

Activate/Deactivate SDK tracking

EnableLogging

Activate/Deactivate debug mode (IMPORTANT: this option causes a greater battery consumption. Use it carefully only while debugging!)

EnableRealtimeLocation

Activate/Deactivate online location monitoring

Enabled

Register a new user

POST http://user.telematicssdk.com/v1/Registration/Create

Register a new user. The method returns DeviceToken that will be placed to telematics SDK and will play a role of an identifier to link telematics data with app user. Authorization: Allow anonymous

Headers

Name
Type
Description

InstanceID

string

//required

InstanceKey

string

//required

{
  "Result": {
    "DeviceToken": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "AccessToken": {
      "Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1MmU4M2U2ZS00YmQxLTQzNTMtYThjMS02ZGY2YzJhMzJhM2QiLCJqdGkiOiJlZWEwMjlmMS01MGY1LTQyYTMtYTNiOS0zMTgyMGI3YjkxZjIiLCJpYXQiOjE1NzY0MDAzNTcsIkFwcGxpY2F0aW9uSWQiOiIxMDAyIiwiU2RrRW5hYmxlTG9nZ2luZyI6IkZhbHNlIiwiU2RrRW5hYmxlVHJhY2tpbmciOiJUcnVlIiwiU2RrRW5hYmxlUmVhbFRpbWVMb2NhdGlvbiI6IkZhbHNlIiwiU2RrQ2xpZW50SWQiOiIiLCJJbnN0YW5jZUlkIjoiM2MxYzhmZDctNDEzMy00MDRhLTgyZTktOTNhMDE1ZDg1MzYyIiwiSW5zdGFuY2VLZXkiOiIxYjdjYzI1Zi0zMjllLTQ0ODItOWRkMS0wYmIwN2MwYzc5NGIiLCJEZXZpY2VUb2tlbiI6IjUyZTgzZTZlLTRiZDEtNDM1My1hOGMxLTZkZjZjMmEzMmEzZCIsIkNvbXBhbnlJZCI6IjMiLCJSZWZyZXNoVG9rZW5FeHBpcmVkRGF0ZSI6IjIyLjEyLjIwMTkgODo1OTowOSIsIlJlZnJlc2hUb2tlbiI6InhacnN0MjF1SjN6cGw1Mmgybi9wUXM3eUVsYTZ6ZmthcDFWT2hnYUhOUVE9IiwibmJmIjoxNTc2NDAwMzU3LCJleHAiOjE1NzY0MDc1NTcsImlzcyI6IndlYkFwaSIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTEzNzQvIn0.5z6eRrKUvI5d0hkjgrOcjPSpCRPsj12uKPkTvKBZ4hI",
      "ExpiresIn": 7200
    },
    "RefreshToken": "xZrst21uJ3zpl52h2n/pQs7yEla6zfkap1VOhgaHNQQ="
  },
  "Status": 200,
  "Title": "",
  "Errors": []
}

For transition period we are using Device Token, however it will be replaced with JWT token soon.

For the purpose of smooth transition, we recommend you to store JWT token and refresh token together with Device ID. Once we will be ready to move to JWT Token we will inform our clients respectively. Device Token will be supported over 12 month since announcement.

JWT token has a lifetime. After this period - it expires. When your JWT token is expired you should refresh your token.

We will support the old platform till November 01, 2021 and keep inform all our clients about progress and required steps.

Important: JWT Token will be used in other API Requests.

Optionally you can add user information to User Service as well as manage SDK tracking and data collection

Adding user information unlocks better experience working with DataHub. The more information you share, the more completed profile you will get in DataHub, as well as more data for portfolio categorisation.

{   
  "CreateAccessToken": true,  // default = true, - return jwt token in response for immediately using or use login to receive jwt
  "FirstName": "string",
  "LastName": "string",
  "Nickname": "string",
  "Phone": "string",
  "Email": "string",
  "Gender": "None", // { "None", "Male", "Female", "Other" }
  "Birthday": "2019-12-13T06:19:18.837Z",
  "MaritalStatus": "string",
  "ChildrenCount": 0,
  "Country": "string",
  "District": "string",
  "City": "string",
  "Status": "Active", //default = active, - you can also create the "deactivated" user
  "Address": "string",
  "ImageUrl": "string" // photo url (you can upload your photo later),
  "InstanceInviteCode": "string", // Registration in instance by invite code
  "UserFields": { // default = null. Will be using dafult values below
    "EnableTracking": true, // default = true - enable tracking user motion
    "EnableLogging": false; // default = false - enable logging on mobile device
    "Enabled": true, // default = true - enable telematics SDK
    "ClientId": "string", // default = null. User ID in your system
  }
}

Register multiple users

POST /v1/Registration/CreateMany

Create a bulk of users Authorization: Allow anonymous

Path Parameters

Name
Type
Description

InstanceID

string

//required

InstanceKey

string

//required

{
  "Result": {
    "Results": [
      {
        "DeviceToken": "8eedd2d1-e873-4cf4-a641-21f478c9c7a3",
         "AccessToken": {
          "Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1MmU4M2U2ZS00YmQxLTQzNTMtYThjMS02ZGY2YzJhMzJhM2QiLCJqdGkiOiJlZWEwMjlmMS01MGY1LTQyYTMtYTNiOS0zMTgyMGI3YjkxZjIiLCJpYXQiOjE1NzY0MDAzNTcsIkFwcGxpY2F0aW9uSWQiOiIxMDAyIiwiU2RrRW5hYmxlTG9nZ2luZyI6IkZhbHNlIiwiU2RrRW5hYmxlVHJhY2tpbmciOiJUcnVlIiwiU2RrRW5hYmxlUmVhbFRpbWVMb2NhdGlvbiI6IkZhbHNlIiwiU2RrQ2xpZW50SWQiOiIiLCJJbnN0YW5jZUlkIjoiM2MxYzhmZDctNDEzMy00MDRhLTgyZTktOTNhMDE1ZDg1MzYyIiwiSW5zdGFuY2VLZXkiOiIxYjdjYzI1Zi0zMjllLTQ0ODItOWRkMS0wYmIwN2MwYzc5NGIiLCJEZXZpY2VUb2tlbiI6IjUyZTgzZTZlLTRiZDEtNDM1My1hOGMxLTZkZjZjMmEzMmEzZCIsIkNvbXBhbnlJZCI6IjMiLCJSZWZyZXNoVG9rZW5FeHBpcmVkRGF0ZSI6IjIyLjEyLjIwMTkgODo1OTowOSIsIlJlZnJlc2hUb2tlbiI6InhacnN0MjF1SjN6cGw1Mmgybi9wUXM3eUVsYTZ6ZmthcDFWT2hnYUhOUVE9IiwibmJmIjoxNTc2NDAwMzU3LCJleHAiOjE1NzY0MDc1NTcsImlzcyI6IndlYkFwaSIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTEzNzQvIn0.5z6eRrKUvI5d0hkjgrOcjPSpCRPsj12uKPkTvKBZ4hI",
          "ExpiresIn": 7200
        },
        "RefreshToken": "otCqu3EL9FSdml9jKhzq4G+hrD6AxZcgo6pUjI1mhqQ="
      },
      {
        "DeviceToken": "72466e2b-a99d-4311-92cb-d977a1eb36ea",
        "AccessToken": {
          "Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1MmU4M2U2ZS00YmQxLTQzNTMtYThjMS02ZGY2YzJhMzJhM2QiLCJqdGkiOiJlZWEwMjlmMS01MGY1LTQyYTMtYTNiOS0zMTgyMGI3YjkxZjIiLCJpYXQiOjE1NzY0MDAzNTcsIkFwcGxpY2F0aW9uSWQiOiIxMDAyIiwiU2RrRW5hYmxlTG9nZ2luZyI6IkZhbHNlIiwiU2RrRW5hYmxlVHJhY2tpbmciOiJUcnVlIiwiU2RrRW5hYmxlUmVhbFRpbWVMb2NhdGlvbiI6IkZhbHNlIiwiU2RrQ2xpZW50SWQiOiIiLCJJbnN0YW5jZUlkIjoiM2MxYzhmZDctNDEzMy00MDRhLTgyZTktOTNhMDE1ZDg1MzYyIiwiSW5zdGFuY2VLZXkiOiIxYjdjYzI1Zi0zMjllLTQ0ODItOWRkMS0wYmIwN2MwYzc5NGIiLCJEZXZpY2VUb2tlbiI6IjUyZTgzZTZlLTRiZDEtNDM1My1hOGMxLTZkZjZjMmEzMmEzZCIsIkNvbXBhbnlJZCI6IjMiLCJSZWZyZXNoVG9rZW5FeHBpcmVkRGF0ZSI6IjIyLjEyLjIwMTkgODo1OTowOSIsIlJlZnJlc2hUb2tlbiI6InhacnN0MjF1SjN6cGw1Mmgybi9wUXM3eUVsYTZ6ZmthcDFWT2hnYUhOUVE9IiwibmJmIjoxNTc2NDAwMzU3LCJleHAiOjE1NzY0MDc1NTcsImlzcyI6IndlYkFwaSIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTEzNzQvIn0.5z6eRrKUvI5d0hkjgrOcjPSpCRPsj12uKPkTvKBZ4hI",
          "ExpiresIn": 7200
        },
        "RefreshToken": "lPHZM7PrtiFPdtGn9bhS4H5z8sFRQtmSAD6td6QkXbg="
      }
    ]
  },
  "Status": 200,
  "Title": "",
  "Errors": []
}
{
  "Quantity": 0,  // required
  "CreateAccessToken": true, // default = true
  "CustomFields": {
    "EnableTracking": true, // default = true
    "EnableLogging": false; // default = false
    "Enabled": true, // default = true
  }  
}

Refresh Token

For any actions use JWT token. You can get it after registration (if GenerateAccessToken = true), Authorization and after RefreshToken.

Using: got 401 Error => refresh token => new JWT and refresh token. Refresh token changes when Login and RefreshToken.

RefreshToken

POST https://user.telematicssdk.com/v1/RefreshToken

Authorization: Allow Anonymous

Request Body

Name
Type
Description

AccessToken

string

The access token that should be refreshed

RefreshToken

string

Refresh token received with access token that should be refreshed

{
  "Result": {
    "DeviceToken": "string",
    "AccessToken": {
      "Token": "jwt token",
      "ExpiresIn": 7200
    },
    "RefreshToken": "new refresh token"
  },
  "Status": 200,
  "Title": "",
  "Errors": []
}

Format of Body Request:

{
  "AccessToken": "string", // required - JWT
  "RefreshToken": "string" // required
}

Get more information about user management including Tracking activation and deactivation:

Activate/Deactivate user (Note: deactivated user is not a deleted user. If you need to permanently delete user, use method)

Here you can find information about how JWT works:

account registration
Update User
https://jwt.io/introduction/
*User Management
Delete User