Developer Journey

Before jumping in to code, we highly recommend you checking out the DIMO Developer Journey to determine how you should build your application:

Developer Onboarding

Here, we outline the onboarding steps that developers may need to go through before building.

Experience DePIN

Download the DIMO Mobile App to see what owners of those 100k cars are experiencing - at least try to connect your car (might not be supported).

Join the Community

Join our Discord community for:

  • Access to 1st hand developer news (#built-on-dimo)

  • Interact with developer resource

  • Monthly Town Hall meetings

Reading

Read up on a few more resources:

DIMO Terminologies

Get a Developer License

Getting a Developer License is the first step to building your app using the DIMO API. With a Developer License, you are registered as a DIMO Developer and will be able to take advantage of the DIMO Permission layer model. A successfully minted Developer License will enable you to get the following API credentials:

  • Developer License clientId (0x Public key)

  • A self-defined domain

  • An enabled-signer privateKey (Private API key)

With the combination of these 3 credentials, you will be able to interact with the DIMO Auth Server to get an API access_token.


Build An App

Before you start to build your app via Wallet-Based Authentication, you'll need to have DIMO-connected vehicles share permissions with you via the Developer License clientId - is acts as your developer identity in the DIMO App Store.

DIMO Check-in

For developers that wish to build an app using the Code Exchange Authentication, you are saving time by reusing the wallet integration and user management on DIMO, but do note that your application is locked in with a single logged-in user that is an existing DIMO user.

Sharing Vehicle Permissions

As of now, there are two ways for a vehicle to share permissions with a Developer:

  1. Using the DIMO Mobile App

    In the DIMO Mobile App, simply go to Vehicle settings > Permission sharing > + > Enter the ENS or 0x address of the Developer License > Select the permissions to share

  2. Interacting with the DIMO Vehicle smart contract directly

    DIMO provides a setPrivileges function on the vehicle contract that takes in an array of tuples which invokes a series of setPrivilege function calls grouped in a single transaction. Note that this method will require a wallet integration on your application.

    An example of the input would be:

[
 (9527, 1, 0xA, 1713510000), (9527, 2, 0xA, 1713510000), 
 (9527, 3, 0xA, 1713510000), (9527, 4, 0xA, 1713510000)
]
  • Requesting privileges sharing for a vehicle with a tokenId of 9527

  • Requesting privileges 1 through 4

  • Privileges will be granted to 0xA Developer License address

  • Permission expires on 1713510000 (unix timestamp in seconds)

Build with DIMO Data

Once you have the vehicle permissions, you have gained the access to interact with the Token Exchange API to obtain privilege tokens for DIMO-connected vehicles.

Telemetry (Requires privilege ID: 1)

Telemetry provides all the sensor signals returned by the DIMO-connected vehicles. The GraphQL implementation provides developers with self-defined queries to avoid over-fetching, aliases to simplify data formatting, and the ability to decouple queries for different signals.

Developer Notes

An example of Telemetry usage would be an app that displays different sensor data. While speed might be something that you wish to display at a higher frequency (refreshes every 10 seconds), powertrainTransmissionTravelledDistance (odometer) reading can be displayed at a lower frequency (refreshes every 6 hours). By using query aliases, you can easily define powertrainTransmissionTravelledDistance as odometer so the API returns the data in the parameter name of your choice.

These benefits of the API allows you to set up different querying cadences and aliases to save you time and resources. Check out Vehicle Usage Report for an implementation of the Telemetry API.

Trips (Requires privilege ID: 3 & 4)

Trips is an abstraction determined by the DIMO Protocol based on the vehicle's driving data. It establishes a trip from start to end, which is recorded with location data (lat, lng).

Developer Notes

Check out Trips Sandbox for an implementation of the Trips API.

Attestation (Requires privilege ID: 5)

For VIN and other vehicle credentials, check out the Attestation API.

Streamr (Requires privilege ID: 6)

For Streamr, check out the DIMO Streamr integration.

Last updated