Generate a Token

Overview

Using the Aerosync API requires authentication. Through an assigned API key and secret, an API token can be generated and used for subsequent requests to the Aerosync API endpoints.

The Basics

An API Token must be generated and attached as Bearer <token> to protected endpoints for access.

Key Terminology

API Key and Secret - Aerosync assigned unique values to be used for token generation.

API Token - Authentication mechanism used to identify and authorize users of the Aerosync API.

Make a request to Aerosync's POST /v2/token endpoint, you will need to include your uniquely assigned API key and secret in the request body.

Sample request to POST /v2/token:

curl --location 'https://api.aerosync.com/v2/token' \
--header 'Content-Type: application/json' \
--data '{
	"apiKey":"test1",
	"apiSecret": "test1"
}'

Response:

{
    "status": "success",
    "statusCode": 200,
    "TTL": "1800",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIxYTJlNTBkMi01OWFlLTQ5OTktYjMyZC00YTQ5YjM3YmMyN2EiLCJleHAiOjE3MTUyMDIyNjYsIkNsaWVudElkIjoiMWYyMTIzNTYtZmNlYi00MmViLWFiZTQtYWE5MjJhY2YyY2Q1IiwiQ2xpZW50TmFtZSI6IkFlcm9wYXkgRGV2In0.4LUNZB5gIAsJi9niz65w4Qr6n_qo17UlefunJ2SJM7w"
}