Api Authentication

Authenticate with the AirSign API using OAuth 2.0 Client Credentials flow. This endpoint issues a Bearer access token for secure API requests.

Endpoint

POST https://api.airsign.com.au/oidc/token

Headers

NameValueRequiredDescription
Content-Typeapplication/x-www-form-urlencodedYesSpecifies the format of the request body
AuthorizationBasic base64(client_id:client_secret)YesBasic Auth with your client credentials

Request Body

ParameterTypeRequiredDescription
grant_typestringYesMust be client_credentials

Example (x-www-form-urlencoded):

grant_type=client_credentials

Example Request

curl --location 'https://api.airsign.com.au/oidc/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Authorization: Basic {base64(client_id:client_secret)}' \
  --data-urlencode 'grant_type=client_credentials'

Response

Status: 200 OK

{
  "access_token": "{BEARER_TOKEN}",
  "expires_in": 3600,
  "token_type": "Bearer"
}
FieldTypeDescription
access_tokenstringThe JWT access token to use in API requests
expires_inintToken lifetime in seconds
token_typestringAlways Bearer

Usage

Include the returned access_token as a Bearer token in the Authorization header for subsequent API requests:

Authorization: Bearer {access_token}

Security Best Practices

  • Keep your client_id and client_secret confidential.
  • Access tokens expire after the specified expires_in period; request a new token as needed.
  • Use HTTPS in production to protect credentials and tokens.