listAccessTokens
First introduced in version: 3.00.6.3
Syntax
listAccessTokens([userId])
Details
Retrieves access token information.
Arguments
userId (optional) is a STRING scalar specifying the user whose tokens to query. The default value is empty. By default, administrators query tokens for all users; non-admin users can query only their own tokens.
Returns
A table with the following columns:
|
Column |
Data Type |
Description |
|---|---|---|
|
tokenId |
STRING |
The token identifier. |
|
userId |
STRING |
The token owner. |
|
createTime |
DATETIME |
The creation time. |
|
expireTime |
DATETIME |
The expiration time. A null value indicates no expiration time. |
|
description |
STRING |
The description. |
|
status |
STRING |
The current status. Possible values are:
Note: If an access token has been revoked and has also expired, its status is displayed as "revoked". |
Examples
Log in as an administrator and query access token information for all users.
The following is sample output. Token identifiers and timestamps vary with each run.
listAccessTokens()
|
tokenId |
userId |
createTime |
expireTime |
description |
status |
|---|---|---|---|---|---|
|
57037cc88a86 |
admin |
2026.10.09 11:40:02 |
2030.12.31 23:59:59 |
MCP client |
valid |
|
184fab277a01 |
user1 |
2026.09.29 03:26:04 |
valid |
Related functions: createAccessToken, revokeAccessToken, authenticateByTicket
