Before we get started building our web application, we need to complete a few setup steps.
1. Sign up for a Smartcar account
2. Retrieve your API credentials
Once you log in, you will see the API credentials for your application. You will need the Client Id and Client Secret credentials to complete this tutorial.
3. Configure your redirect URI
You will need to set a
redirect_uri for your application. This represents the location of where your application is hosted. Register the following as a redirect uri for your application:
http://localhost:8000/exchange. We will be using this in the next section.
4. Clone a starter kit
Now that you have your application registered, clone a starter kit for the language of your choice to get started. In the cloned repository, you will find the Smartcar SDK installed and a simple server set up.
git clone https://github.com/smartcar/getting-started-python-sdk.git cd getting-started-python-sdk/tutorial
# set up and activate your virtual enviornment pip install -r requirements.txt
You will also have to set the following environment variables -
export SMARTCAR_CLIENT_ID=<your-client-id> export SMARTCAR_CLIENT_SECRET=<your-client-secret> export SMARTCAR_REDIRECT_URI=http://localhost:8000/exchange
Now that we’ve set up our application, let’s learn more about Smartcar Connect.