Refreshing Refresh Tokens
Refresh tokens expire after 60 days ordinarily or after 1 minute when used to fetch a new token pair.
Depending on your application logic, there may be cases where you don’t end up fetching a fresh access token for more than 60 days. If this is the case, you should fetch a new token pair before the 60 days are up so the user doesn’t need to go through Connect again.
This will give you a newly minted access token and refresh token.
A refresh token is invalidated 1 minute after use. Please ensure you're persisting both the newly minted access and refresh token. Failure to do so will require the user to go through Connect again after the access token has expired.
Request
Headers
HTTP Basic Auth header containing the client_id
and client_secret
.
The header is formed by concatenating the word “Basic”, a space, and a base64-encoded
string consisting of the client_id
, a colon :
, and the client_secret
.
Must be set to application/x-www-form-urlencoded
, matching the format of the request body.
A valid HTTP User Agent value.
Body
This value must be set to refresh_token
The refresh token received in the response with the access token from an auth code exchange or prior token refresh.
Response
A string representing an access token used to make requests to the Smartcar API.
The number of seconds the access token is valid for. This is always set to 7200 (2 hours)
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.
Always set to Bearer
.
Was this page helpful?