/ SDKs / JavaScript
SDKs
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
JavaScript
Version 4

Retrieve a list of operators

Copy link

You can follow the simple implementation below to retrieve a list of operators who monitor and control the activities in a channel.

JavaScriptTypeScript
const query = channel.createOperatorListQuery();

const operators = await query.next();

In an open channel, you can also retrieve a list of operators and check each of them like the following.

JavaScriptTypeScript
const query = channel.createOperatorListQuery();

const operators = await query.next();

for (const operator in channel.operators) {
    // ...
}