Tokens
Overview
Create private access tokens to allow your backend services to make authenticated RPC requests to an Endpoint. This allows you to make requests from any backend origin.
This token is private information and should never be exposed on a front-end.
On the load balancers, we support "user:password" style basic authentication if you need to use that form of auth. In those cases, the password is the token. The token_user is randomly generated, so every token has a unique user.
List Tokens
GET /api/v1/tokens
Returns all tokens that the current authentication token has access to.
Parameters
account_uuid *
string
Will filter the results by account_uuid.
subscription_uuid *
string
Will limit the results by subscription_uuid.
per
string
page
string
* Either a subscription_uuid
or account_uuid
parameter is required
Request
Example requests with page filtering, number of tokens per page and filtering by account uuid and subscription uuid.
Response
Returns a hash with the tokens
key containing an array of tokens objects and the meta
containing pagination data.
Get Token
This API is not available.
Create Token
POST /api/v1/subscriptions/:subscription_uuid/tokens
Add a new token that can be used to access the Subscription's Endpoints
Parameters
name *required
string
A human readable name to describe the token.
rate_tier *required
string
The name of the <link>Rate Tier for this token, which defines rate limits for it. Each token incurs costs based on the Rate Tier defined for it.
Request
Example requests with account_uuid and subscription_uuid filtering.
Response
All submitted keys, plus the following are returned:
uuid
string
The generated primary key to reference this token.
auth_username
string
A randomly generated value that can be for basic authentication if needed.
value
string
The value used for authentication.
Activate Token
This API is only limited to account management API tokens created with the reseller and operator role.
PUT /api/v1/tokens/:token_uuid/activate
Activate a token so that it can be used.
Parameters
token_uuid
is the only parameter that needs to be provided.
Request
Response
Deactivate Token
This API is only limited to account management API tokens created with the reseller and operator role.
PUT /api/v1/tokens/:token_uuid/deactivate
Deactivate a token so that it cannot be used.
Parameters
All parameters are optional.
deactivation_reason
string
A human readable description to describe the deactivation reason.
Request
Example request with deactivation_reason
.
Response
Last updated