Skip to main content

Server SDK

Get Vehicle Data From DIMO APIs

DIMO Server SDK is a suite of Developer SDKs that allows app developers to access data from the DIMO APIs. Developers have a choice between several popular programming languages such as NodeJS, Typescript, Python, and C#.

How It Works

1

Install the SDK

  • npm install @dimo-network/data-sdk
  • yarn add @dimo-network/data-sdk
2

Initiate the SDK

import { DIMO } from '@dimo-network/data-sdk';

const dimo = new DIMO('Production');
3

Authenticate to get a Developer JWT

Using Your Developer License details, you will first need to authenticate using your client_id, redirect_uri, and api_key.

const developerJwt = await dimo.auth.getDeveloperJwt({
client_id: '<client_id>',
domain: '<redirect_uri>',
private_key: '<api_key>',
});
4

Getting a Vehicle JWT

const vehicleJwt = await dimo.tokenexchange.getVehicleJwt({
...developerJwt,
tokenId: <token_id>
});
5

Fetching Vehicle Data

const something = await dimo.telemetry.query({
...vehicleJwt,
query: `
query {
some_valid_GraphQL_query
}`
});