Learn how to connect vehicles to your Smartcar application using Smartcar Connect.
Client ID
and Client Secret
redirect_uri
for your applicationStep 1: Launch Smartcar Connect
Step 2: Handle the Redirect and Get the Authorization Code
redirect_uri
you provided in your app configuration. The redirect will include an authorization code
as a query parameter.Step 3: Exchange the Code for an Access Token
client_id
, client_secret
, and the same redirect_uri
.access_token
and a refresh_token
.Step 4: Store Tokens
access_token
and refresh_token
securely in your application’s database. These tokens are sensitive credentials that allow access to vehicle data and actions, so:access_token
expires after two hours. You will need to use the refresh_token
to obtain new access tokens when needed. The refresh_token
expires after 60 days. If the refresh_token
expires, the user will need to reauthorize your application.