Get Members of a Channel

Prev Next
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.

If the channel is a broadcast channel, you need the view-broadcast-member-list permission.

Changelog

Version Description
0.59.0 Added
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).

Example['online', 'away']
filter
string

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

Examplemy-nickname
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}. Refer to the official documentation to learn more.

count
integer

The number of items to return. Refer to the official documentation to learn more.

Example50
offset
integer

Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.

Example50
Responses
200

OK

Success
{
  "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
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string