Embedded SDK to kick webinar attendees

I want to kick out webinar attendees after some time has passed. I assumed that the ZoomMtgEmbedded web sdk would return the list of attendees when client.getAttendeeslist is called, but this is not the case, it only returns the Panelists. So I can’t call client.expel(userId) because I don’t know the userId.

const client = ZoomMtgEmbedded.createClient();
...
client.join({...});
const attendees = client.getAttendeeslist();

This was the first problem I had. I would like to confirm if the getAttendesslist method should return all attendees from a webinar or only the panelists?

client.getAttendeeslist();

Now, I circumvent the issue by consuming the Meeting REST API to retrieve the participants report

report/webinars/${webinarId}/participants

But when I call the web client .expel method, providing the “user_id”: “XXXXX”,

client.expel(XXXXXX);

the client returns:

Uncaught (in promise) {type: 'INVALID_PARAMETERS', reason: 'no matched user'}

So, two questions.
1 - How can I get the current attendees of a webinar.
2 - Why can’t I expel a use from a webinar?

Browser Console Error
Uncaught (in promise) {type: ‘INVALID_PARAMETERS’, reason: ‘no matched user’}

Which Web Meeting SDK version?
“name”: “@zoomus/websdk”,
“version”: “2.17.0”,

Meeting SDK Code Snippets
I used the meetingsdk-react-sample (

and I changed the index.js to use the App-New.js as App instead of App.js.

I also added a function

  function kick() {
    const attendees = client.getAttendeeslist();
    console.log(attendees);
    client.expel(16783360);
  }

and a button to trigger the kick action:

<button onClick={kick}>Kick </button>
        <button onClick={getSignature}>Join Meeting</button>

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Join meeting as host using the react-app
  2. Join, in a separated machine, as attendee
  3. Click on Kick button
  4. See result on console

Screenshots

Troubleshooting Routes
I used the sample app to test, but the results are the same.

Device (please complete the following information):

  • Device: Macbook Pro
  • OS: macOS 14
  • Browser: Chrome
  • Browser Version 117.0.5938.149 (Official Build) (arm64)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.