Get Members of a Channel
    • Dark
      Light
    • PDF

    Get Members of a Channel

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/channels.members

    Lists all channel users. The list of elements a user can use to sort the list is limited. The current sortable element is:username

    Changelog

    VersionDescription
    0.59.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Query parameters
    roomId
    string

    The room id. It is required if the roomName is not provided.

    Exampledlpfuijw7ej
    roomName
    string

    The room name. It is required if the roomId is not provided.

    Examplegeneral
    status
    array of string

    The user's status (search filter).

    filter
    string

    Extra search filters to be applied to the fields defined in the Accounts_SearchFieldssetting.

    sort

    List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}

    count
    integer

    The number of items to return.

    Example50
    offset
    integer

    Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items.

    Example50
    Responses
    200

    OK

    Example 1
    {
      "members": [
        {
          "_id": "rbAXPnMktTFbNpwtJ",
          "username": "roxie",
          "status": "offline",
          "_updatedAt": "2023-09-24T22:27:33.610Z",
          "name": "test test",
          "nickname": "baby girl"
        },
        {
          "_id": "5fRTXMt7DMJbpPJfh",
          "username": "test.test",
          "status": "offline",
          "_updatedAt": "2023-09-16T08:33:38.123Z",
          "name": "Testtest",
          "avatarETag": "GFoEi6wv3uAxnzDcD",
          "nickname": "test.test"
        }
      ],
      "count": 2,
      "offset": 0,
      "total": 2,
      "success": true
    }
    Expand All
    object
    members
    Array of object
    object
    _id
    string
    username
    string
    status
    string
    _updatedAt
    string
    name
    string
    nickname
    string
    avatarETag
    string
    count
    integer
    offset
    integer
    total
    integer
    success
    boolean

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.