Postman guide

How to import the API spec to Postman, authorize and make requests

Add collection and authorize

Download the API specification here for import into Postman.

Right-click the newly imported collection and select Edit to configure the collection for Oauth 2.0 Authorization.
Getting a token for the API can either be done through Code Flow or Client Credentials Flow, select based on your use case:

  • Authorization Code Flow : Authorization for users. Multiple users will be able to login and fetch data for their accounts on Airthings.
  • Client Credentials Flow : Authorization for a machine, i.e. a backend integration. Only one account will be used in the integration.

Authorization Code Flow

The client id, secret and redirect_uri for your client needs to be added from the clients page.

Now you should be able to get an access token that can be used by the collection, by pressing Use Token.

Client Credentials Flow

The client ID, secret for your client needs to be added from the clients page.

Finalizing Postman setup

In the collection set the request authorization to Inherit auth from parent (or Oauth 2.0).

Sending the requests should now succeed as long as the access token is valid (1 hour, in Code Flow: the refresh_token is then to be used to get a new access_token, in Client Credentials Flow: the client_id, client_secret is used to fetch a new token).