Smartcar is an API that allows mobile and web applications to communicate with vehicles across brands (think “check odometer” or “unlock doors.”). This tutorial will help you get up and running with the Smartcar API.
- The user’s browser is redirected to a specified Smartcar-hosted
codeas a query parameter. The redirect page will then send the code to the Single-Page Application’s
onCompletecallback using the
- The Single-Page Application sends the received authorization
codeto the Application’s back-end service.
- The Application sends a request to the Smartcar API. This request contains the authorization
codealong with the Application’s client id and client secret.
- In response, Smartcar returns an
- Using the
access_token, the Application can now send requests to the Smartcar API. It can access protected resources and send commands from and to the user’s vehicle, such as retrieve the location and unlock the doors.
Follow along with our integration tutorial to build our simple web application.
This tutorial is split into three sections:
- Setup - Set up your environment to develop on Smartcar
- Authorization flow - Learn about Smartcar Connect and how to get an authorization
- Send a request - Learn how to exchange an authorization
access_tokenrequired to send a request to Smartcar
Let’s get building!