Vehicle Authorization & Permissions
Refreshing Access Tokens
Your access token will expire 2 hours after it is issued. When this happens, your application can retrieve a new one by using the corresponding refresh_token without requiring the user to re-authenticate.
POST
This refresh flow applies to per-vehicle OAuth tokens in the v2.0 API. The v3 API uses application-level M2M tokens, which are short-lived and re-requested with client credentials rather than refreshed.
Body
Response
Request
Headersstring
default:"Basic "
required
The HTTP Authorization header using the Basic authentication scheme.To construct the Authorization header value:
- Join your
client_idandclient_secretwith a single colon (:). - Base64-encode the resulting string:
base64({client_id}:{client_secret}) - Prepend
Basic(with a trailing space) to the encoded string.
Basic bXktY2xpZW50LWlkOm15LWNsaWVudC1zZWNyZXQ=string
required
Must be set to
application/x-www-form-urlencoded, matching the format of the request body.string
required
A valid HTTP User Agent value. This value is typically included in the HTTP requests by the client that is making the request. You usually don’t have to set this manually.
string
required
This value must be set to
refresh_tokenstring
required
The refresh token received in the response with the access token from an auth code exchange
or prior token refresh.
string
A string representing an access token used to make requests to the Smartcar API.
number
The number of seconds the access token is valid for. This is always set to 7200 (2 hours)
string
A string representing a refresh token, which is used to renew access when the current access token expires. The refresh token expires after 60 days.
string
Always set to
Bearer.
