Join a Meeting

Join meetings in the Web SDK using the ZoomMtg.init() method to launch the SDK, then the ZoomMtg.join() to join the user into the meeting. The join method receives an encrypted signature, your API Key, a meeting ID, and any user settings.

Before joining, remember to prepare the required files and set up a server-side signature function.

The Web Meeting SDK does not support users joining meetings with Telephony Service Provider (TSP) audio. Users must change the Audio to Computer Audio.

Create meeting

For testing, create a meeting in your Zoom client or at https://zoom.us/meeting/schedule to retrieve a Meeting ID and passcode. Advanced applications can also use the Meetings API to create and retrieve meetings. If you already have a meeting ID to join, continue on.

Create meetConfig object

To receive user input and meeting settings, create a client-side meetConfig object to pass data to a server-side generateSignature function and the meeting join methods.

Example meetConfig object:

const meetConfig = {
	apiKey: '3239845720934223459'
	meetingNumber: '123456789',
	leaveUrl: 'https://yoursite.com/meetingEnd',
	userName: 'Firstname Lastname',
	userEmail: 'firstname.lastname@yoursite.com',
	passWord: 'password', // if required
	role: 0 // 1 for host; 0 for attendee
};

Please note that when using PMIs for the meetingNumber property, WebSDK attendees are not allowed to join meetings before the host.

Launch & Join meeting

Pass your meetConfig object to a getSignature function. Make a request to your signature endpoint, then pass that response to call the init method.

In the ZoomMtg.init() method, set any meeting settings (ex: leaveUrl, isSupportAV).

Call the ZoomMtg.join() method as a success param of ZoomMtg.init(). The join() method will handle your signature (as a text string).

index.js
import { ZoomMtg } from '@zoomus/websdk'

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

getSignature(meetConfig) {
	fetch(`${YOUR_SIGNATURE_ENDPOINT}`, {
			method: 'POST',
			body: JSON.stringify({ meetingData: meetConfig })
		})
		.then(result => result.text())
		.then(response => {
			ZoomMtg.init({
				leaveUrl: meetConfig.leaveUrl,
				isSupportAV: true,
				success: function() {
					ZoomMtg.join({
						signature: response,
						apiKey: meetConfig.apiKey,
						meetingNumber: meetConfig.meetingNumber,
						userName: meetConfig.userName,
						// password optional; set by Host
						passWord: meetConfig.passWord 
						error(res) { 
							console.log(res) 
						}
					})		
				}
			})
	}
}

Set this function to launch within your application, for example, on a “Join Meeting” button.

Joining meetings with reCAPTCHA

As of version 1.7.9, meeting participants might see a reCAPTCHA check to join meetings. To ensure this check is working, run your application on port 80 or 443.

On successful join methods, participants might see a pop up modal with a reCAPTCHA check. After participants successfully complete reCAPTCHA, they will enter the meeting.

Join registered meeting

Web SDK v1.9.6 and above supports the meeting registration feature using the registration token denoted by the tk value in the query parameter. This feature enables users to join registered meetings automatically. Your app handles the join process automatically using the registration token retrieved via the Zoom API.

Automatically join registered meeting

Attendees can join registered meetings using a registration token, which is the value of the tk query parameter in the registrant’s join_url:

"join_url": "https://example.zoom.us/w/12345?tk=TOKEN"

To get a registrant’s token and join the meeting:

  1. Call Add meeting registrant, List meeting registrants, or Update registrant’s status.
  2. Get the tk value from the response:
{
   "registrant_id": "ESJWWYqvTDWFGNUqJzB_bQ",
   "id": 96231721187,
   "topic": "My Registered websdk Meeting",
   "start_time": "2021-05-31T14:00:00Z",
   "join_url": "https://example.zoom.us/w/12345?tk=JtbsW3pp3KxPLLrE_y7-968kggkV7R5czHM9c0tVvgpM.DQIAAAAWZ9uI4xZFU0pXV1lxdlREV0ZHTlVxSnpCX2JRAzzzzzz&pwd=Ri0TkdxhXeWRUOITyT3ZDZmOOOGwxQT09&uuid=XX_pII1ZlzIQ42xx3zA2zYrrU"
}

// Example in JavaScript
var registrantToken = new URL(response.join_url).searchParams.get("tk")

// JtbsW3pp3KxPLLrE_y7-968kggkV7R5czHM9c0tVvgpM.DQIAAAAWZ9uI4xZFU0pXV1lxdlREV0ZHTlVxSnpCX2JRAzzzzzz
  1. Set the registrant token as the value for tk in ZoomMtg.join:
ZoomMtg.join({
         meetingNumber: meetingConfig.meetingNumber,
         userName: meetingConfig.userName,
         signature: signature,
         apiKey: meetingConfig.apiKey,
         userEmail: meetingConfig.userEmail,
         passWord: meetingConfig.passWord,
         tk: registrantToken, //JtbsW3pp3KxPLLrE_y7-968kggkV7R5czHM9c0tVvgpM.DQIAAAAWZ9uI4xZFU0pXV1lxdlREV0ZHTlVxSnpCX2JRAzzzzzz
         success: function (res) {
           console.log("join meeting success");
           console.log("get attendeelist");
           ZoomMtg.getAttendeeslist({});
           ZoomMtg.showPureSharingContent({
             show: true
            });
           ZoomMtg.getCurrentUser({
             success: function (res) {
               console.log("success getCurrentUser", res.result.currentUser);
             },
           });
         },
         error: function (res) {
           console.log(res);
         },
       });