Force waiting room for participants

Hello.
I create a new meeting with the zoom API setting waiting_room: true. Afterwards, when a participant joins the meeting with web sdk 1.8.1 he is automatically approved. How can I force someone to join the waiting room?
Moreover is there any way to make sure that a participant can never become host?

I am currently using a free account to test some features.

@tab.lambros

Thanks for using the Zoom developer forum!

There is 1 possible way that you can do this. But it may work different for different devices. Can you tell me which device you are using, and the version please?
@PantherDeveloper

I dont understand your question. I’m building a web application which will be used both by desktop and mobile devices.

Hey @tab.lambros,

Can you please share the response body JSON after you called the Create Meeting API? I am guessing your waiting room settings are being overridden by your account settings.

Thanks,
Tommy

@tommy Thanks for helping me with this question.

Gabe
@PantherDeveloper

Here it is. I removed host_id, email, and the urls. I assumed the same but waiting room is enabled in my security settings

array(19) {
[“uuid”]=>
string(24) “”
[“id”]=>
int()
[“topic”]=>
string(12) “test meeting”
[“type”]=>
int(2)
[“status”]=>
string(7) “waiting”
[“start_time”]=>
string(20) “2020-12-01T07:33:29Z”
[“duration”]=>
int(30)
[“timezone”]=>
string(13) “Europe/Athens”
[“created_at”]=>
string(20) “2020-12-01T07:33:29Z”
[“password”]=>
string(4) “test”
[“h323_password”]=>
string(6) “”
[“pstn_password”]=>
string(6) “”
[“encrypted_password”]=>
string(32) “”
[“settings”]=>
array(26) {
[“host_video”]=>
bool(true)
[“participant_video”]=>
bool(true)
[“cn_meeting”]=>
bool(false)
[“in_meeting”]=>
bool(false)
[“join_before_host”]=>
bool(true)
[“mute_upon_entry”]=>
bool(false)
[“watermark”]=>
bool(false)
[“use_pmi”]=>
bool(false)
[“approval_type”]=>
int(2)
[“audio”]=>
string(4) “voip”
[“auto_recording”]=>
string(4) “none”
[“enforce_login”]=>
bool(false)
[“enforce_login_domains”]=>
string(0) “”
[“alternative_hosts”]=>
string(0) “”
[“close_registration”]=>
bool(false)
[“show_share_button”]=>
bool(true)
[“allow_multiple_devices”]=>
bool(true)
[“registrants_confirmation_email”]=>
bool(true)
[“waiting_room”]=>
bool(true)
[“request_permission_to_unmute_participants”]=>
bool(false)
[“contact_name”]=>
string(35) â€œÎ›ÎŹÎŒÏ€ÏÎżÏ‚ Î€Î±ÎŒÏ€ÎżÏÏÎ»ÎżÏ‚â€
[“contact_email”]=>
string(21) “tab.lambros@gmail.com”
[“registrants_email_notification”]=>
bool(true)
[“meeting_authentication”]=>
bool(false)
[“encryption_type”]=>
string(19) “enhanced_encryption”
[“approved_or_denied_countries_or_regions”]=>
array(1) {
[“enable”]=>
bool(false)
}
}
[“code”]=>
int(201)
}

Hey @tab.lambros,

Can you try setting the join_before_host value to false? My thought is since you have join_before_host set to true, the participants are able to skip the waiting room.

Can you also try upgrading to version 1.8.3?

Let me know if that sorts it out! :slight_smile:

Thanks,
Tommy

Hey. I did what you suggested but nothing changed. I also noticed that joining as participant always fails with
axiosJsonpCallback1({“status”:false,“errorCode”:3000,“errorMessage”:“The current sdk version doesn’t support register meeting/webinar, please upgrade to the latest version.”})

Many people can join with a host signature ( no waiting room ) but none with a participant one.

I am getting a bit confused. 


Hey @tab.lambros,

Gotcha, it sounds like you are using Meeting Registration, but Meeting Registration is not supported on the Web SDK yet. Only for webinars:

What is your use case here, or goal? I am happy to help you figure this out! :slight_smile:

Thanks,
Tommy

What I need is to have an ongoing meeting where participants will join the waiting room and the host will accept them one by one.
My join code is the following:

ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

ZoomMtg.init({
leaveUrl: meetConfig.leaveUrl,
isSupportAV: true,
success: function() {
ZoomMtg.join({
signature: {$signature},
apiKey: meetConfig.apiKey,
meetingNumber: meetConfig.meetingNumber,
userName: meetConfig.userName,
passWord: meetConfig.passWord,
success: function(res) {
ZoomMtg.record({
record: true
});

      ZoomMtg.showRecordFunction({
        show: true
      });
    },
     error: function (res) {
      console.log(res);
    },
  })
},
error: function (res) {
  console.log(res);
},

})

The signature is produced by the following method

function generateSignature ( $meeting_number, $role)
{
$time = time() * 1000 - 30000;//time in milliseconds (or close enough)

  $data = base64_encode($this->apiKey . $meeting_number . $time . $role);

  $hash = hash_hmac('sha256', $data, $this->apiSecret, true);

  $_sig = $this->apiKey . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);

  return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
}

join fails when passing role=0 to generateSignature()

Hey @tab.lambros,

In that case, you need to have the Waiting Room enabled for the meeting.

What error message do you get in the browser console? Can you share your Web SDK signature for a test meeting with the issue so I can help debug further?

Thanks,
Tommy

According to the create meeting response, waiting room is enabled for this meeting.

array(20) {
[“uuid”]=>
string(24) “”
[“id”]=>
int(96286459112)
[“host_id”]=>
string(22) “”
[“topic”]=>
string(12) “test meeting”
[“type”]=>
int(2)
[“status”]=>
string(7) “waiting”
[“start_time”]=>
string(20) “2020-12-08T07:16:26Z”
[“duration”]=>
int(30)
[“timezone”]=>
string(13) “Europe/Athens”
[“created_at”]=>
string(20) “2020-12-08T07:16:26Z”
[“password”]=>
string(4) “test”
[“h323_password”]=>
string(6) “”
[“pstn_password”]=>
string(6) “”
[“encrypted_password”]=>
string(32) “”
[“settings”]=>
array(28) {
[“host_video”]=>
bool(true)
[“participant_video”]=>
bool(true)
[“cn_meeting”]=>
bool(false)
[“in_meeting”]=>
bool(false)
[“join_before_host”]=>
bool(false)
[“mute_upon_entry”]=>
bool(false)
[“watermark”]=>
bool(false)
[“use_pmi”]=>
bool(false)
[“approval_type”]=>
int(1)
[“audio”]=>
string(4) “both”
[“auto_recording”]=>
string(4) “none”
[“enforce_login”]=>
bool(false)
[“enforce_login_domains”]=>
string(0) “”
[“alternative_hosts”]=>
string(0) “”
[“close_registration”]=>
bool(false)
[“show_share_button”]=>
bool(true)
[“allow_multiple_devices”]=>
bool(true)
[“registrants_confirmation_email”]=>
bool(true)
[“waiting_room”]=>
bool(true)
[“request_permission_to_unmute_participants”]=>
bool(false)
[“global_dial_in_countries”]=>
array(1) {
[0]=>
string(2) “US”
}
[“global_dial_in_numbers”]=>
array(6) {
[0]=>
array(4) {
[“country_name”]=>
string(2) “US”
[“number”]=>
string(13) “+1 6465588656”
[“type”]=>
string(4) “toll”
[“country”]=>
string(2) “US”
}
[1]=>
array(4) {
[“country_name”]=>
string(2) “US”
[“number”]=>
string(13) “+1 6699009128”
[“type”]=>
string(4) “toll”
[“country”]=>
string(2) “US”
}
[2]=>
array(4) {
[“country_name”]=>
string(2) “US”
[“number”]=>
string(13) “+1 2532158782”
[“type”]=>
string(4) “toll”
[“country”]=>
string(2) “US”
}
[3]=>
array(4) {
[“country_name”]=>
string(2) “US”
[“number”]=>
string(13) “+1 3017158592”
[“type”]=>
string(4) “toll”
[“country”]=>
string(2) “US”
}
[4]=>
array(4) {
[“country_name”]=>
string(2) “US”
[“number”]=>
string(13) “+1 3126266799”
[“type”]=>
string(4) “toll”
[“country”]=>
string(2) “US”
}
[5]=>
array(4) {
[“country_name”]=>
string(2) “US”
[“number”]=>
string(13) “+1 3462487799”
[“type”]=>
string(4) “toll”
[“country”]=>
string(2) “US”
}
}
[“registrants_email_notification”]=>
bool(true)
[“meeting_authentication”]=>
bool(false)
[“encryption_type”]=>
string(19) “enhanced_encryption”
[“approved_or_denied_countries_or_regions”]=>
array(1) {
[“enable”]=>
bool(false)
}
}
[“code”]=>
int(201)
}

Trying to join with signature

using the code I posted earlier I get

  1. errorCode: 1
  2. errorMessage: “Fail to join the meeting.”
  3. method: “join”
  4. result: “The current sdk version doesn’t support register meeting/webinar, please upgrade to the latest version.”
  5. status: false

Hey @tab.lambros,

approval_type needs to be set to 2. Try that and it should work!

Thanks,
Tommy

It worked! than you so much for your help!

1 Like

Hey @tab.lambros,

You are welcome! :slight_smile:

Let us know if we can help with anything else!

-Tommy

Hello again guys
I was hoping you could help me with another issues. If the host accidentally closes the window or clicks leave meeting by accident, is there any way he can join again and become host?

Hey @tab.lambros,

Thank you for reaching out to the Zoom Developer Forum. With version 1.8.1 and later, if the host gets disconnected, you can use the same host signature and pass role 1 in order to rejoin the meeting as the Co-Host. If you pass role 0, you will rejoin as a participant.

That being said, the current functionality if the host gets disconnected, one of the participants will be assigned the Host. Once the original Host rejoins, they will be the Co-Host.

I hope that helps! Let me know if you have any questions.

Thanks,
Max

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