Start a meeting via API

Hi fellows
We are integrating Zoom meeting with our web application, and we have been able to use the Zoom API to create meetings, delete meetings, obtain information about meetings, join meetings etc., the only thing we have not found a way to do is to start the meeting via API , always requires the user to log in manually to use the meeting start link, does anyone know a way to start a meeting via API? We saw that this could be done via the SDK, but it apparently requires many other components.
Thank you very much

Hey @Marcus1

Thanks for posting on the Zoom Devforum! I am still learning, but I will try my best to help answer your question. :slightly_smiling_face:

Checkout these related threads that may have the answer you are looking for:

If these threads did not help, please let us know by replying back here and someone from the Developer Relations team will get back to you shortly.

Thanks,
DeveloperBot

So I understand, looking at the first thread, there is no way to do that via API

Hey @Marcus1,

Correct, a real user (human) needs to start the meeting. :slight_smile:

Thanks,
Tommy

Hi tommy

Thanks for your answer. We read more about this Zoom integration, and apparently the API is used to create meetings, delete meetings, get information about meetings and so on, and the Zoom SDK could be used specifically to start and join meetings programmatically, without the need for a “humman” to start the meeting, is that correct? We tried to do this, start and join a meeting via SDK, but even considering we received an “OK” response from the init method, we are unable to join the meeting, we get the message:
“Time limit for entering the meeting.” and “Failed to enter the meeting” (at the same modal. PS: we tried this inside a valid date/time of a meeting, so it was not expired)
Looking at the console, we see the following messages:
About INIT: Object {method: “init”, status: true, errorCode: 0, errorMessage: null, result: null}
About JOIN: Object {method: “join”, status: false, result: “No permission”, errorMessage: “Failed to join the meeting.”, ErrorCode: 1}
Another message that caught our attention was: “The cookie“ _zm_ctaid ”was rejected because it has already expired.” (Firefox 80.0.1)
You can see our code below, the Meeting ID, API key and other information are correct, but changed here for security:

    ZoomMtg.setZoomJSLib('https://dmogdx0jrul3u.cloudfront.net/1.7.9/lib', '/av'); 
    ZoomMtg.setZoomJSLib('https://source.zoom.us/1.7.9/lib', '/av'); 
    ZoomMtg.preLoadWasm();
    ZoomMtg.prepareJssdk();

    const meetConfig = {
        apiKey:'xxxxxxxxxxx',
        meetingNumber: 'xxxxxxxxxxx',
        userName: 'Marcus',
        signature: 'xxxxxxxx',
        userEmail: 'marcus@xxxxxxxx',
        passWord: 'xxxxxxx',
        error(res) {
            console.log("Joining meeting error");
            console.dir(res);
        },
        success() {
            console.log("Joining success");
        }
    };
    ZoomMtg.init({
        leaveUrl: 'https://www.oursite.com.br',
        // isSupportAV: true,
        isSupportChat: false, 
        isSupportQA: false, 
        isLockBottom: false,
        success: function (success) {
            console.log("Init Success", success);
            console.dir(meetConfig);
            ZoomMtg.join(meetConfig);
        }
    });

We really appreciate any help or insight you can provide, thank you very much!

Hi @Marcus1,

Thanks for providing these details as you start working with our web SDK.

First, regarding the below—this is correct:

Zoom SDK could be used specifically to start and join meetings programmatically, without the need for a “humman” to start the meeting, is that correct?

In regards to:

we received an “OK” response from the init method, we are unable to join the meeting, we get the message:
“Time limit for entering the meeting.” and “Failed to enter the meeting” (at the same modal. PS: we tried this inside a valid date/time of a meeting, so it was not expired)

If possible, can you share the following:

  • A screenshot of the modal/console error messages in the browser as you’ve encountered them
  • A copy of the signature you’re using when trying to start the meeting

Another message that caught our attention was: “The cookie“ _zm_ctaid ”was rejected because it has already expired.” (Firefox 80.0.1)

Similarly, the requested resources above will help me to debug.

Thanks, and I’ll keep an eye out!
Will

Hi Will, thank you for you reply, you can see the screenshots below, hope it helps:

Hey @Marcus1,

Can you share your Web SDK signature for a test meeting to developersupport@zoom.us so we can help debug the issue?

Thanks,
Tommy

Yes

image001.jpg

We are using this PHP function to generate the signature:

public static function generate_signature ( $api_key, $api_secret, $meeting_number, $role){

$time = time() * 1000 - 30000;

$data = base64_encode($api_key . $meeting_number . $time . $role);

$hash = hash_hmac(‘sha256’, $data, $api_secret, true);

$_sig = $api_key . “.” . $meeting_number . “.” . $time . “.” . $role . “.” . base64_encode($hash);

return rtrim(strtr(base64_encode($sig), ‘+/’, '-’), ‘=’);

}

Hey @Marcus1,

Can you provide the actual signature itself instead of the generate_signature function? (The one that’s been generated when you encounter this error). We’ll be able to debug once we can see the already generated signature.

Thanks!
Will

Hi Will
The signature number generated is:

tks!

Hey @Marcus1,

I think the signature here is a bit off—this should be roughly 127 characters long, and it looks like yours is 32 characters.

Can you make sure you’re correctly following the steps outlined here to generate your signature?:

Thanks,
Will

Hi Will, thank you again for your help!

image001.jpg

image002.jpg

Hi Will,

 I am also facing the same issue which @Marcus1 has faced. I generated signature using the documentation 'https://marketplace.zoom.us/docs/sdk/native-sdks/web/build/signature' using PHP 

and I got the signature as '. But still getting the same error as @Marcus1 mentioned.

Hi Will
To be sure we have the correct signature, we now are using Heroku, an it generated this signature:

Now we get the message “The meeting number is wrong”

Thank you!

Hi @wikikidslimited,

When I decode your signature, I can see that you’re missing a few fields, such as the JWT token:
image

Please ensure you’re including the JWT token, the meeting ID, timestamp, and role in your signature when you follow these steps.

Thanks,
Will

Hey @Marcus1,

I’m still seeing undefineds in your signature:

Can you please ensure you’re passing valid values for the fields I referenced in the above post?

Thanks,
Will

Hi will,

 I'm using php code to generate signature 

 function generate_signature ( $api_key, $api_secret, $meeting_number, $role){
$time = time() * 1000 - 30000;//time in milliseconds (or close enough)
$data = base64_encode($api_key . $meeting_number . $time . $role);
$hash = hash_hmac('sha256', $data, $api_secret, true);	
$_sig = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);	
return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
  }

  This function has only four parameters. apikey, apisecret, meetingnumber, role which I am providing it correct. But you are saying to include JWT Token. I confused where to include this JWT Token. Can you please guide me.

Thank you

Hey @wikikidslimited,

Apologies—I meant to say the API key and secret! In the signature you provided, the first parameter is preceded by a “…” which is invalid.

Have you tried using our signature generator?

Thanks,
Will