Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
54 lines (42 loc) · 2.23 KB

get-members-of-a-channel.md

File metadata and controls

54 lines (42 loc) · 2.23 KB

Get Members of a Channel

Lists all channel users.

HTTP MethodURLRequires Auth
GET/api/v1/channels.membersyes

Query Parameters

This endpoint supports the #pagination parameters. Additional query parameters are as follows:

{% hint style="info" %} The list of elements a user can use to sort the list is limited. The current sortable element is:username {% endhint %}

KeyExample ValueDescription
roomId* or roomName*ByehQjC44FwMeiLbX or generalThe channel ID or the channel name. You must enter at least one of these parameters.
status['online', 'away']The user's status (search filter).
filtermy-nicknameExtra search filters to be applied to the fields defined in the Accounts_SearchFields setting.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     https://localhost:3000/api/v1/channels.members?roomId=ByehQjC44FwMeiLbX&count=2

Example Response

{
    "members": [
        {
            "_id": "Loz7qh9ChSqHMPymx",
            "username": "customField_apiuser.test.1529436896005",
            "name": "customField_apiuser.test.1529436896005",
            "status": "offline"
        },
        {
            "_id": "Zc3Y3cRW7ZtS7Y8Hk",
            "username": "customField_apiuser.test.1529436997563",
            "name": "customField_apiuser.test.1529436997563",
            "status": "offline"
        }
    ],
    "count": 2,
    "offset": 0,
    "total": 35,
    "success": true
}

Change Log

Version Description
0.59.0 Added