API Reference
Request a new access token
/auth/token https://transaction-api.cable.tech 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
Token request parameters
-
expiry_secondsinteger requiredThe requested expiration time in seconds for the token. Must be between 300 (5 minutes) and 86400 (24 hours).
Format
int64Limits
≥ 300≤ 86400 -
scopesobject required-
organization_idstring requiredThe organization ID for which the token is requested. This is required.
-
scopeslist of strings requiredThe list of scopes that the token should have. For transaction data, the scope should be ‘transactions:write’.
-
Responses
200 Token created successfully
-
tokenstring required -
expiryinteger requiredThe expiration time in Unix time format.
Format
int64 -
organization_idstring requiredThe organization ID for which the token was requested.
-
organization_namestring requiredThe name of the organization for which the token was requested.
-
scopesobject-
organization_idstring requiredThe organization ID for which the token is requested. This is required.
-
scopeslist of strings requiredThe 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
-
codeinteger requiredFormat
int32 -
messagestring required -
errorslist of objectsDetailed information about errors in specific fields.
-
fieldstring -
messagestring
-