---
title: "Request a new access token"
method: POST
path: "/v2/auth/token"
tags: ["Authentication"]
---

# Request a new access token

`POST /v2/auth/token`

The Cable API uses API keys to authenticate requests. Make sure never to share your API keys - don’t put them in
repositories or leave them as human-readable in code, and always use HTTPS.

Request a new access token to authenticate requests to the API. The token will expire after the specified time.
To request an access token you must use the refresh / auth token provided to you by Cable.
You cannot request a new token with an existing access token.

## Request body

- NewAccessTokenRequest
  - `expiry_seconds` integer, required — The requested expiration time in seconds for the token. Must be between 300 (5 minutes) and 86400 (24 hours).
  - `scopes` AccessTokenScope, required
    - `organization_id` string, required — The organization ID for which the token is requested. This is required.
    - `scopes` string[], required — The list of scopes that the token should have. For transaction data, the scope should be 'transactions:write'.

## Response `200`

Token created successfully

- NewAccessTokenResponse
  - `expiry` integer, required — The expiration time in Unix time format.
  - `organization_id` string, required — The organization ID for which the token was requested.
  - `organization_name` string, required — The name of the organization for which the token was requested.
  - `scopes` AccessTokenScope
    - `organization_id` string, required — The organization ID for which the token is requested. This is required.
    - `scopes` string[], required — The list of scopes that the token should have. For transaction data, the scope should be 'transactions:write'.
  - `token` string, required

## Other responses

- `401` — Unauthorized request
- `429` — Rate limit exceeded
- `500` — Server error
- `default` — General error

---

[API](https://skmtc.dev/cable/apis/cable-api.md) · [All operations](https://skmtc.dev/cable/apis/cable-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cable/cable-api/revisions/3222cd28dba5/schema)
