# Embedded SDK to kick webinar attendees

**URL:** <https://devforum.zoom.us/t/embedded-sdk-to-kick-webinar-attendees/96551>\
**Category:** Web\
**Created:** [October 10, 2023, 8:35pm UTC](https://devforum.zoom.us/t/embedded-sdk-to-kick-webinar-attendees/96551 "2023-10-10T20:35:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adm](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@adm](https://devforum.zoom.us/u/adm)\
**Post date:** [October 10, 2023, 8:35pm UTC](https://devforum.zoom.us/t/embedded-sdk-to-kick-webinar-attendees/96551/1 "2023-10-10T20:35:07Z")

</div>

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.

```auto
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?

```auto
client.getAttendeeslist();

```

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

```auto
report/webinars/${webinarId}/participants

```

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

```auto
client.expel(XXXXXX);

```

the client returns:

```auto
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](https://github.com/zoom/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

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

```

and a button to trigger the kick action:

```auto
<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)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 10, 2023, 6:35am UTC](https://devforum.zoom.us/t/embedded-sdk-to-kick-webinar-attendees/96551/2 "2023-11-10T06:35:51Z")

</div>

Closed on November 10, 2023, 6:35am UTC

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