GET_USERS

The GET_USERS handler retrieves a paginated list of users, with support for sorting and cursor-based pagination.

Interaction Format

To interact with this handler, use the following format:

Get the latest 50 users (default):

Send({
    Target = "target_process_id",
    Action = "GET_USERS"
})

Get the oldest 100 users:

Send({
    Target = "target_process_id",
    Action = "GET_USERS",
    Tags = {
        limit = 100,
        sortBy = "oldest"
    }
})

Get the next batch of users (cursor-based):

Send({
    Target = "target_process_id",
    Action = "GET_USERS",
    Tags = {
        limit = 50,
        sortBy = "latest",
        cursor = "last_user_id_from_previous_request"
    }
})

Input Parameters

Field
Type
Required
Default
Description

limit

Number

No

50

Number of users to retrieve (max 1000).

sortBy

String

No

"latest"

Sort order: "latest" or "oldest".

cursor

String

No

None

User ID for pagination (optional).

Validations

  • limit: Must not exceed 1000.

  • cursor: If provided, must be a valid user ID.

Response Format

Success

{
    "status": "success",
    "data": {
        "users": [user_object_1, user_object_2, ...],
        "next_cursor": "next_user_id",
        "total_count": 50,
        "has_more": true
    }
}

Error

{
    "status": "error",
    "message": "Limit cannot exceed 1000"
}

Last updated