Skip to main content
POST
/
auth
/
component-token
Create Component Token
curl --request POST \
  --url https://api-sandbox.axle.energy/auth/component-token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'external_user_id=<string>' \
  --data 'allowed_origin=<string>' \
  --data 'user_email=<string>' \
  --data gave_boundary_meter_consent_at=2023-11-07T05:31:56Z
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "access_token": "<string>",
  "token_type": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/x-www-form-urlencoded
external_user_id
string
required
allowed_origin
string
required
user_email
string

The email of the user, to be added for new users or upserted for existing users.

Timezone-aware ISO 8601 timestamp (e.g. '2026-01-01T12:34:56Z') indicating when the household gave consent for Axle to access readings from their boundary meter, if consent was given.

Unless explicitly exempted, this must be provided on the first call to this endpoint (per external_user_id). It can optionally be included in later calls for the same external_user_id; the value submitted most recently will be kept on record.

Response

Successfully authenticated with a user-scoped access token

Organisation scoped token. Includes internal user ID so clients can make futher API requests regarding this user if needed.

id
string<uuid>
required
access_token
string
required
token_type
string
required