API tokens

Get the current API token

Returns the token that authenticated this request: its name, abilities, team and expiry. Any valid token may call it, whatever its abilities, so SDKs and the Terraform provider use it to check credentials before doing anything else. Revoked and expired tokens get 401.

get/token

Request

  • Base URL
    https://api.spectate.net/v1
  • Auth
    HTTP bearer

Response

The token that authenticated the request.

idstring uuid required

Token ID

namestring required

Name given to the token when it was created

last_fourstring required

Last four characters of the token, to tell tokens apart

abilitiesApiTokenAbility[] required

What the token may do. Each endpoint lists the ability it requires

expires_atstring date-time nullable required

When the token stops working; null if it never expires

created_atstring date-time required

When the token was created

Example response

{
  "name": "Terraform",
  "last_four": "a1B2",
  "team": {
    "name": "Acme"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.