How to eject participant if owner leaves room.

Hi, first time question. We're developing in using the Daily plugin and Rest API.

My question is how can I handle ejecting the participant when the owner leaves the session(meeting)?

More: The model we are pursuing involves the Room Owner paying for the cost of the video session with another participant. We have successfully created sessions using tokens and a waiting room "request to join." The owner can join the session and admit the participant, however, once the owner leaves the room the participant can remain indefinitely keeping the meeting going and incurring charges that the owner would be responsible for.

I am familiar with polling the participants in order to determine the abscence of the owner. However it would appear that my only option for removing the participant at this point is to delete the room, which I'd prefer doing more gracefully after collecting stats. Shouldn't there be a eject participant method?

Best Answer

  • Tamara
    Tamara Moderator, Dailynista admin
    Answer ✓

    Hi @Rob_Dare ! Thanks for your message.

    Deleting the room is currently the only way to do this, like you mention. However, we are working on a new API that will allow you to eject participants, which will be released later this year (October). Keep an eye out on our release logs here on the forum for when this has been released. You can also find our change logs here:


  • Rob_Dare
    Rob_Dare Unconfirmed, Member

    Here's an update with a workaround. I setup a database trigger in Bubble triggered by a field I update when the owner leaves. I then send a room update that changes the expiration date to now + 1minute and eject when expired. This could be made easier if there were more webhooks, for instance "participant left," but it works.

  • Tamara
    Tamara Moderator, Dailynista admin

    Thanks for sharing! This is really helpful and I'll share this internally as well.

  • Tamara
    Tamara Moderator, Dailynista admin

    Hi @Rob_Dare just wanted to check to on your workaround and see if this is working as expected for you. I got some internal feedback on your message that the workaround mentioned will not work. The expiration date and eject_at_room_exp  are only read at the time the user joins the room. Modifying them later has no effect on users already in the room.

    Have you considered listening for our participant events instead?