latestSwagger 2.02026-08-1095121164.0 KB

94758829689e

auth

Authorize Machine Token

Exchanges a machine token for a session token. This endpoint does not require an Authorization header. Returns a session token that can be used as a Bearer token in subsequent API calls.

post/v0/authorize/machine-token

Request body

clientstring required

Client identifier

machine_tokenstring required

Machine token for authentication

Example request

{
  "client": "terminus",
  "machine_token": "dcr_aALXf3Rho1EmPj7A"
}

Response

expires_atinteger required

Session expiration timestamp (Unix timestamp)

sessionstring required

Session token for subsequent API calls

user_idstring required

Authenticated user identifier

Example response

{
  "expires_at": 1735689600,
  "session": "abc123sessiontoken",
  "user_id": "12345678-90ab-cdef-1234-567890abcdef"
}