Postman + Auto API

December 12, 2023
Until now, our SDKs and sample apps have been the quickest way to get started working with our Auto API. Today, we would like to introduce another, even easier way: calling the Auto API directly with a pre-configured collection of REST API calls in Postman, an API testing application which allows users to send requests to an API and easily inspect the responses.

We have made changes in our authentication flow and AutoAPI which makes using High Mobility APIs easier than before. Meanwhile Postman has become the de facto way to explore APIs for both developers and non technical people and we designed our API to be easy to use in Postman.

This article assumes that you are using High Mobility’s sandbox environment and already created the following resources: 

1. Application

  • Fleet app
  • Single driver app (consumer services)


2. Simulator: 

goes into details of using authentication and AutoAPI for Fleet and Driver usage case.

Fleet Application Postman Collection

Import Fleet Postman Collection

Start by visiting https://www.postman.com/ and search for High Mobility, then select “Fleet Vehicle APIs” and click on “Run in Postman”

Environment Configuration

The next step is to configure the environment, copy your application’s OAuth credentials into the Postman environment.

Authorization

We are using the features of Postman to handle the authorizations. The access token which you obtain is valid for 5 minutes and could be use to:

  • Manage vehicles in your fleet
  • Check vehicle eligibility 
  • Get vehicle data

Visit “Authorization” tab in the postman collection and hit “Get New Access Token”

After 5 minutes if you want to continue interacting with the APIs you need to repeat that again 

Fleet Vehicle Management

Now you are all setup to check vehicle eligibility, add the vehicle and fetch data:

Driver Application Postman Collection

Import Driver Postman Collection

Start by visiting https://www.postman.com/ and search for High Mobility, then select “Driver Vehicle APIs” and click on “Run in Postman”

Environment Configuration

The next step is to configure the environment, visit your application page, add a “Redirect URI” and then copy your application’s OAuth credentials into the Postman environment

Authorization

We are using the features of Postman to handle the authorizations. You need to go through the OAuth consent, the access token which you obtain is valid for 1 hour and will be automatically refreshed by Postman. This access token can be used to:

  • Manage vehicle consent
  • Get vehicle data

Visit “Authorization” tab in the postman collection and hit “Get New Access Token”

Vehicle Data

Now you are all setup to fetch data vehicle data, you need to first call “Access Token Info” API to get the VIN and then call Vehicle Data API

Read Next