Requesting Access Tokens
HeadersThe HTTP Authorization header using the Basic authentication scheme.To construct the Authorization header value:
- Join your
client_id
andclient_secret
with 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=
Must be set to
application/x-www-form-urlencoded
, matching the format of the request body.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.
The authorization code received in the handle response step.
This value must be set to
authorization_code
The
redirect_uri
provided in the redirect to Connect step. This value is checked to match the URI sent when the user was directed to Connect.If you launch Connect from a single-page or mobile application,
redirect_uri
must match the URI passed in your Connect URL, not the redirect for your backend.Response
access_token
A string representing an access token used to make requests to the Smartcar API.
expires_in
The number of seconds the access token is valid for. This is always set to 7200 (2 hours)
refresh_token
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.
token_type
Always set to
Bearer
.