Allocate token
A token is used for SD service authentication and usage statistics. You can map each token to a specific account and assign one token to each end user.
API description
Allocates a token.
Prerequisites
You must have integrated the AI Creation Workshop software development kit (SDK). For more information, see Legacy SDK Reference.
Authorization method
This API uses an AccessKey ID and AccessKey Secret (AK/SK) pair for authorization. For more information about how to obtain an AK/SK pair, see API Authorization.
Endpoint
https://openai.edu-aliyun.comRequest path
/scc/allocate_tokenRequest parameters
Name | Type | Required | Description | Example |
name | string | No | A custom ID. | test |
tokenExpiredAt | long | No | The expiration time of the token. This is a 13-digit UNIX timestamp. | 1719807345000 |
sceneRoleId | string | No | The ID of the attached role. | 01j2bapbjd**** |
Response parameters
Name | Type | Description |
data | object | The returned data. |
Data parameters
Name | Type | Description |
apiToken | string | The token. |
tokenExpiredAt | long | The expiration time of the token. |
usedSessionTimeInSeconds | long | The session duration that has been used, in seconds. |