Login with DIMO Redirect
Last updated
Was this helpful?
Last updated
Was this helpful?
If your application isn't React-based, you can still build a button in your tech stack that redirects users to one of the following URL types, depending on your flow of interest. All you need to get started is your clientId
and a redirectUri
that you configured in your application via the .
If you want to implement a Login with DIMO flow, but don't need access to vehicle data (i.e. you just want to collect users email addresses for marketing purposes), you can use the following URL structure:
https://login.dimo.org/?clientId=
<clientId>
&redirectUri=
<redirectUri>
Please note, that if you use this method, you will not be able to make requests to any protected API endpoints, as you will not have privileged access to this users vehicles.
Check out an
If you're implementing a Login with DIMO flow that requires users to provide access to one or more of their vehicles, and you do not want to set a custom expiration date for how long these vehicles will be shared with you, you can use the following URL structure (the default expiration date is 100 years from the time a user shares their vehicle with you):
https://login.dimo.org/?clientId=
<clientId>
&redirectUri=
<redirectUri>
&permissionTemplateId=
<templateId>
&entryState=VEHICLE_MANAGER
Check out an
If you're implementing a Login with DIMO flow that requires users to provide access to one or more of their vehicles, and you want to set a custom expiration date for how long these vehicles will be shared with you, you can use the following URL structure:
https://login.dimo.org/?clientId=
<clientId>
&redirectUri=
<redirectUri>
&permissionTemplateId=
<templateId>
&entryState=VEHICLE_MANAGER?expirationDate=
<date>
Note that the <date>
parameter should be set in the format of: YYYY-MM-DD
Users implementing the Login with DIMO flow using the Redirect URL form also have access to additional parameters that can be included if needed.
Force Email
You can require users to share their email address with you by enforcing that they select the email sharing checkbox prior to successful sign in. Use the &forceEmail=true
parameter to the end of the URL.
https://login.dimo.org/?clientId=
<client_id>
&redirectUri=
<redirect_uri>
&permissionTemplateId=
<template_id>
&entryState=VEHICLE_MANAGER
&forceEmail=true
You can limit your integration to only permit certain vehicle makes from connecting to your application by appending the &vehicleMakes=
parameter to the end of the URL. For example, if you're building a Tesla-only application, you can format the URL like so:
https://login.dimo.org/?clientId=
<client_id>
&redirectUri=
<redirect_uri>
&permissionTemplateId=
<template_id>
&entryState=VEHICLE_MANAGER
&vehicleMakes=Tesla
This also supports an array of vehicles, such as: &vehicleMakes=['hyundai', 'lexus']
If you're running campaigns and need to add UTM parameters to your Login with DIMO URL, you can append ?utmName=anything
to the end of your URL, like so:
https://login.dimo.org/?clientId=
<client_id>
&redirectUri=
<redirect_uri>
&permissionTemplateId=
<template_id>
&entryState=VEHICLE_MANAGER
&utm=dimo
Once a user goes through the login flow, they would be redirected to your redirectUri + the UTM params you've set at the end of the URL.
Check out an
If you've gotten this far, you've successfully set up the DIMO redirect URL on your frontend. If you're building an application that also requires you to access vehicle data after a user has shared privileged access with you, we recommend you implement the for the backend. When a user authenticates via the Login component, their walletAddress
is returned - meaning you're ready to query the to obtain the Token IDs of the vehicles that were shared with you.