Join a Webinar

Webinars are launched and joined 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 webinar ID, and any user settings.

Before joining, remember to prepare required files and setup a signature function.

Creating Webinars

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

Create meetConfig Object

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

Example meetConfig object:

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

Launch & Join Webinar

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 webinar 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'

// prepare required files
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

getSignature(meetConfig) {
	// make a request for a signature
	fetch(`${YOUR_SIGNATURE_ENDPOINT}`, {
			method: 'POST',
			body: JSON.stringify({ meetingData: meetConfig })
		})
		.then(result => result.text())
		.then(response => {
			// call the init method with meeting settings
			ZoomMtg.init({
				leaveUrl: meetConfig.leaveUrl,
				isSupportAV: true,
				// on success, call the join method
				success: function() {	
					ZoomMtg.join({
						// pass your signature response in the join method
						signature: response,
						apiKey: meetConfig.apiKey,
						meetingNumber: meetConfig.meetingNumber,
						userName: meetConfig.userName,
						passWord: meetConfig.passWord,
						// on success, get the attendee list and verify the current user
						success: function (res) {
            console.log("join meeting success");
            console.log("get attendee list");
            ZoomMtg.getAttendeeslist({});
            ZoomMtg.getCurrentUser({
              success: function (res) {
                console.log("success getCurrentUser", res.result.currentUser);
              },
            });
          },
error: function (res) {
            console.log(res);
          },
					})		
				}
			})
	}
}

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

Joining Webinars with Registration Required

As of version 1.8.0 and higher, the Web SDK can be used to join webinars with registration required. After successfully joining the webinar (see above), a registration dialog screen will display, prompting the user to register for the webinar.

After registering, the user will then join by clicking “Join Webinar in Progress”.

Need help?

The first place to look is on our Developer Forum. If you can't find the answer or your request includes sensitive information, contact Developer Support.