v4

latestOpenAPI 3.0.1Apache 2.02026-08-036821,1001.5 MB
Authorization

Generate new API token

Generate a new API token with given permissions and expiration time. The available permission list can be found via 'GET /auth/permissions' endpoint.

post/auth/apitoken

Request body

expire_timeinteger

The token expire time, format is the number of seconds from epoch of 1970-01-01T00:00:00Z. If null means no expiration, the minimum value is current time plus 300 seconds.

descriptionstring

The token description

permissionsstring[] required

The token permissions

Example request

{
  "rate_limit": {
    "hour": 7500,
    "second": 100
  }
}

Response

OK

access_tokenstring required

The API access token

create_timestring date-time required

The create timestamp

expire_timestring date-time

The expire timestamp, if null means no expiration

creator_idinteger required

The user ID who created the API token

customer_idinteger required

The customer ID who owns the API token

descriptionstring

The description for the API token

permissionsstring[] required

The permissions for the API token