All Products
Search
Document Center

AI Coding Assistant Lingma:ListUserPersonalAccessTokens

Last Updated:May 29, 2025

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 Enterprise settings > Organization.

Product

Resource

Required permission

Organization settings

User

Read-only

Request syntax

GET https://{domain}/oapi/v1/platform/users/admin/personalAccessTokens

Request header

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Position

Required

Description

Example

userId

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

created_at

string

The date and time when the access token is created.

2023-03-22T12:44:50.048Z

description

string

The description of the access token.

Example token description

expired_at

string

The date and time when the access token expires.

2023-03-22T12:44:50.048Z

name

string

The name of the access token.

Example token name

permissions

array[string]

The list of permissions granted to the user by the access token.

["base_user_rea"]

token_id

string

The access token ID.

pt-0fh3****0fbG

user_id

string

The unique user ID. Same as userId.

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.