Enterprise administrators can call this API to get a list of access tokens of a specified user.
Supported editions | Enterprise Dedicated Edition |
Service endpoints and authorization information
Get the service endpoint to replace <domain> in the API request syntax with your endpoint.
Obtain the access token.
Obtain the
organizationId. Go to the Lingma console and view the organization ID on the Basic Information page under .
Product | Resource | Required permission |
Organization settings | User | Read-only |
Request syntax
GET https://{domain}/oapi/v1/platform/users/admin/personalAccessTokensRequest header
Parameter | Type | Required | Description | Example |
| string | Yes | The access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Position | Required | Description | Example |
| string | query | Yes | The unique user ID. |
Request example
curl -X 'GET' \
'https://{domain}/oapi/v1/platform/users/admin/personalAccessTokens?userId={userId}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'Response parameters
Parameter | Type | Description | Example |
- | array | ||
- | object | ||
| string | The date and time when the access token is created. | 2023-03-22T12:44:50.048Z |
| string | The description of the access token. | Example token description |
| string | The date and time when the access token expires. | 2023-03-22T12:44:50.048Z |
| string | The name of the access token. | Example token name |
| array[string] | The list of permissions granted to the user by the access token. | ["base_user_rea"] |
| string | The access token ID. | pt-0fh3****0fbG |
| string | The unique user ID. Same as | 3001****-****-4229-a7f2-********41ad |
Response example
[
{
"created_at": "2023-03-22T12:44:50.048Z",
"description": "Example token description",
"expired_at": "2023-03-22T12:44:50.048Z",
"name": "Example token name",
"permissions": ["base_user_read"],
"token_id": "pt-0fh3****0fbG",
"user_id": "3001****-****-4229-a7f2-********41ad"
}
]Error codes
For more information, see Error codes.