Skip to main content
GET
/
user
/
ls
Python
from acontext import AcontextClient

client = AcontextClient(api_key='sk_project_token')

# List all users
users = client.users.list()
for user in users.items:
    print(f"{user.identifier}: {user.id}")

# List users with pagination
users = client.users.list(limit=20, time_desc=True)
if users.has_more:
    next_users = client.users.list(limit=20, cursor=users.next_cursor)
{
  "code": 123,
  "error": "<string>",
  "msg": "<string>",
  "data": {
    "has_more": true,
    "items": [
      {
        "created_at": "<string>",
        "id": "<string>",
        "identifier": "<string>",
        "project_id": "<string>",
        "updated_at": "<string>"
      }
    ],
    "next_cursor": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Project Bearer token (e.g., "Bearer sk-ac-xxxx")

Query Parameters

limit
integer

Limit of users to return. Max 200. If limit is 0 or not provided, all users will be returned.

cursor
string

Cursor for pagination. Use the cursor from the previous response to get the next page.

time_desc
boolean

Order by created_at descending if true, ascending if false (default false)

Response

200 - application/json

OK

code
integer
error
string
msg
string
data
object