How to end meeting automatically if host is unavailable between meeting or connection lost

i have created meeting through API and websdk implemented on website. now i want that if host’s internet connection lost or power off then meeting should be end. Now meeting is continue if host is unavailable.

Which version?
i am using

Hey @vijay2,

You can use the Participant Left webhook and check to see if the host left, then call the End Meeting API.


Thanks tommy,
i got my solution.

can you help me more.
suppose there are 2 users :- Instructor, Admin
Instructor start a meeting from websdk and become host. Admin join that meeting from zoom admin panel. Now admin is user, i want to make instructor as cohost when admin joins and make admin as host.

$body = array(
“topic”=> $request->class_name,
“type”=> “2”,
“start_time”=> date(‘Y-m-d’,strtotime($request->class_time)).‘T’.date(‘H:i:s’,strtotime($request->class_time)),
“duration”=> $request->class_duration,
“schedule_for”=> “”,
“password”=> “”,
“agenda”=> “meeting description”,
“settings” => [
“host_video”=> “true”,
“participant_video”=> “false”,
“cn_meeting”=> “false”,
“in_meeting”=> “true”,
“join_before_host”=> “false”,
“mute_upon_entry”=> “true”,
“watermark”=> “false”,
“use_pmi”=> “false”,
“approval_type”=> “0”,
“registration_type”=> “1”,
“audio”=> “voip”,
“auto_recording”=> “none”,
“alternative_hosts”=> “”,
“waiting_room”=> “false”,
“meeting_authentication”=> “false”,
“enforce_login”=> “false”,
“registrants_email_notification”=> “false”
from this code i am creating meeting, please help me what changes i have to make

i start meeting from this code
var signature = ZoomMtg.generateSignature({
apiKey: API_KEY,
apiSecret: API_SECRET,
role: meetingConfig.role,
success: function (res) {
meetingConfig.signature = res.result;
meetingConfig.apiKey = API_KEY;
var joinUrl = “private/live/”+INS_ID+’/’+INS_NAME+’?’+ testTool.serialize(meetingConfig);
console.log(joinUrl);, “_self”);

Hey @vijay2,

Unfortunately we do not have an API or Web SDK function to programmatically make someone a Co-Host.

Checkout my post here:

In the future, for additional questions please create a new topic. :slight_smile:


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