Joining a meeting


Inside your index.js file you will need to set the following variables and methods.

Set your meeting config object

Inside the meeting config object you can set your the following paramters (For More details visit our API reference).

  • API Key
  • API Secret
  • Meeting number
  • Username - Name this is displayed during the meeting.
  • Password - (Optional )If the meeting requires a password.
  • Leave Url - Where the user gets redirected to when the meeting ends.
  • Role - 1 is host, 0 is attendee, webinar just support 0

Setting meeting config object

var meetConfig = {
          apiKey: API_KEY,
          apiSecret: API_SECRET,
          meetingNumber: parseInt(document.getElementById('meeting_number').value),
          userName: document.getElementById('display_name').value,
  				userEmail: "developer@zoom.us"
          passwd: "blVReC9oam",
          leaveUrl: "https://zoom.us",
          role: 0 //joining as user
        };

Call the Generate Signature function

Inside the generate signature method you will need to set the parameters from your meeting config function.

Call Generate Signature

var signature = ZoomMtg.generateSignature({
            meetingNumber: meetConfig.meetingNumber,
            apiKey: meetConfig.apiKey,
            apiSecret: meetConfig.apiSecret,
            role: meetConfig.role,
            success: function(res){
                console.log(res.result);
            },
              error: function(res){console.log(res)}
        });


Call the Join function

Call the join function inside the init method. Inside the join function you will need to set the meetings number, username, signature, apikey, and password (optional for meetings that require passwords).

Call the Join function

ZoomMtg.init({
            leaveUrl: 'http://www.zoom.us',
            isSupportAV: true,
            success: function () {
                ZoomMtg.join(
                    {
                        meetingNumber: meetConfig.meetingNumber,
                        userName: meetConfig.userName,
                        signature: signature,
                        apiKey: meetConfig.apiKey,
                        userEmail: 'email@gmail.com',
                        passWord: meetConfig.passWord,
                        success: function(res){
                            $('#nav-tool').hide();
                            console.log('join meeting success');
                        },
                        error: function(res) {
                            console.log(res);
                        }
                    }
                );
            },
            error: function(res) {
                console.log(res);
            }
        });