Create a personal access token
An enterprise administrator can use this API to create a personal access token.
The new Qoder CN documentation site is now available. Content on this site may not reflect the latest product features and changes. Visit docs.qoder.cn for the latest product documentation.
|
Supported editions |
Enterprise Dedicated Edition |
Service endpoints
Get the service endpoint and replace {domain} in the API request syntax with your endpoint.
Authorization information
|
Product |
Resource |
Required permissions |
|
organization management |
user |
Read and write |
Request syntax
POST https://{domain}/oapi/v1/platform/users/admin/personalAccessTokens
Request |
Create a personal access token
|
Request headers |
|
|
The access token. See Access token for details. Example: pt-0fh3****0fbG_35af****0484. |
|
Request parameters |
|
|
expiredAt The expiration time of the token. |
|
|
name The name of the token. |
|
|
permissions The permission scopes for the token. You can obtain these scopes by using the Enterprise Dedicated Edition API. |
|
|
userId The user ID. Use the ListUsers - Query a list of users API to obtain this ID. |
|
|
description The description of the token. |
Response parameters |
Response example
|
|
createdAt The time when the token was created. |
|
|
description The description of the token. |
|
|
expiredAt The expiration time of the token. |
|
|
name The name of the token. |
|
|
permissions The permission scopes of the token. |
|
|
token The personal access token. |
|
|
tokenId The token ID. |
|
|
userId The user ID. |
Error codes
For more information, see Error code center.