Skip to content

API Reference

Request a new access token

POST /v2/auth/token https://api.cable.tech

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.

Authentication

  • API key in the Authorization header

Request body

application/json object

Token request parameters

  • expiry_seconds integer required

    The requested expiration time in seconds for the token. Must be between 300 (5 minutes) and 86400 (24 hours).

    Format int64

    Limits ≥ 300≤ 86400

  • scopes object required
    • organization_id string required

      The organization ID for which the token is requested. This is required.

    • scopes list of strings required

      The list of scopes that the token should have. For transaction data, the scope should be ‘transactions:write’.

Responses

200 Token created successfully

  • token string required
  • expiry integer required

    The expiration time in Unix time format.

    Format int64

  • 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 object
    • organization_id string required

      The organization ID for which the token is requested. This is required.

    • scopes list of strings required

      The list of scopes that the token should have. For transaction data, the scope should be ‘transactions:write’.

Errors

  • 401 Unauthorized request
  • 429 Rate limit exceeded
  • 500 Server error
  • default General error

Error body 401429500default

  • code integer required

    Format int32

  • message string required
  • errors list of objects

    Detailed information about errors in specific fields.

    • field string
    • message string