---
title: "Get the current API token"
method: GET
path: "/token"
tags: ["API tokens"]
---

# Get the current API token

`GET /token`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/token`
- Auth: HTTP bearer

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`.

## Response `200`

The token that authenticated the request.

- ApiToken: The API token that made the request.
  - `id` string, uuid, required: Token ID
  - `name` string, required: Name given to the token when it was created
  - `last_four` string, required: Last four characters of the token, to tell tokens apart
  - `abilities` ApiTokenAbility[], required: What the token may do. Each endpoint lists the ability it requires
  - `team` ApiTokenTeam, required: The team an API token acts for.
    - `id` string, uuid, required: Team ID
    - `name` string, required: Team name
  - `expires_at` string, date-time, nullable, required: When the token stops working; `null` if it never expires
  - `created_at` string, date-time, required: When the token was created

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spectate/apis/spectate-api.md) - [All operations](https://skmtc.dev/spectate/apis/spectate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spectate/apis/spectate-api/revisions/9b1a233997de?raw)
