Getting Error- The meeting number is wrong. for web SDK 1.7.9

Description
I’m trying to integrate zoom video in react web app.
Using react-hooks feature here.

For getting signature -

  • created a free zoom developer account
  • created a JWT app to get the api_key and api_secret
  • deploy the signature sample app to a free Heroku instance

Error
I am getting error - The meeting number is wrong . while launching the zoom meeting

Which version?
“react”: “^16.13.1”,
@zoomus/websdk”: “^1.7.9”,

Screenshots

System Info:

  • Device: Lenovo-L450
  • OS: Ubuntu 16.04
  • Browser:Chrome

Zoom component code:

import React, { useEffect, useState } from ‘react’;
import { Grid, Card } from ‘@material-ui/core’;
import { ZoomMtg } from ‘@zoomus/websdk’;
import ‘@zoomus/websdk/dist/css/bootstrap.css’;
import ‘@zoomus/websdk/dist/css/react-select.css’;

const meetConfig = {
apiKey: API_KEY,
apiSecret: API_SECRET,
meetingNumber: ‘meeting-id’,
userEmail: ‘some-email-id’,
userName: ‘some-username’,
passWord: ‘some-password’,
leaveUrl: ‘http://localhost:3000’,
role: 0,
};

const ZoomComponent = () => {
const [meetingLaunched, setMeetingLaunched] = useState(false);

const joinZoomMeeting = () => {
setMeetingLaunched(!meetingLaunched);
fetch(‘https://zoom-signature-app.herokuapp.com/’, {
method: ‘POST’,
body: JSON.stringify({ meetingData: meetConfig }),
})
.then((result) => result.text())
.then(
(response) => {
ZoomMtg.init({
leaveUrl: meetConfig.leaveUrl,
isSupportAV: true,
success() {
ZoomMtg.join(
{
meetingNumber: meetConfig.meetingNumber,
userName: meetConfig.userName,
signature: JSON.parse(response).signature,
apiKey: meetConfig.apiKey,
userEmail: meetConfig.userEmail,
passWord: meetConfig.passWord,
success() {
console.log(‘join meeting success’);
},
error(res1) {
console.log(res1);
},
},
);
},
error(res2) {
console.log(res2);
},
});
},
);
};

useEffect(() => {
ZoomMtg.setZoomJSLib(‘node_modules/@zoomus/websdk/dist/lib’, ‘/av’);
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
joinZoomMeeting();
}, );

return (





);
};

export default ZoomComponent;

Hey @samadhan.madane31,

Can you share your meeting signature to developersupport@zoom.us so I can debug?

Thanks,
Tommy

Hi @tommy ,
I was generating the signature by deploying the signature sample app to a free Heroku instance.
I was following this link - /docs/sdk/native-sdks/web/essential/signature

Here is the generated signature,
{
“signature”: “”
}

I tried another approach to generate the signature using ZoomMtg.generateSignature

ZoomMtg.generateSignature({
meetingNumber: meetConfig.meetingNumber,
apiKey: meetConfig.apiKey,
apiSecret: meetConfig.apiSecret,
role: meetConfig.role,
success(res) {
console.log(‘signature’, res.result);
ZoomMtg.init({
leaveUrl: meetConfig.leaveUrl,
success() {

With this second approach, I’m able to join the meeting and everything works as expected. I’m using the same apiKey and apiSecret.
Is the second approach is right one?
Could you please guide/recommend me with your thoughts for right approach?

Hey @samadhan.madane31,

After decoding your signature, it looks like you are passing in 123456789 as the meeting number.

Please use a real meeting number. :slight_smile:

Thanks,
Tommy

Hi, I followed the same steps and got the same ‘The meeting number is wrong’ error. I console logged the meeting number before running the fetch command to make sure it was my personal meeting id. I have tried starting the meeting using Zoom client first then join via sdk. I also tried changing my meeting setting to allow join before host and disabled waiting room. Nothing worked.

I got same problem.

meeting: “***********”

signature:

Pls help!!!

*This post has been edited to remove any meeting / webinar IDs

Hey @xwang, @nhat.nguyen,

Both of you are setting the meeting number as undefined when generating the signature.

Base64decode your signature to help debug the issue.

Thanks,
Tommy

@tommy Thanks for your reply!
@nhat.nguyen In case you made the same mistake, I had to change the body of the fetch request to:

body: JSON.stringify({
meetingNumber: meetConfig.meetingNumber,
role: meetConfig.role
})

instead of
body: JSON.stringify({ meetingData: meetConfig })

1 Like

Thanks for sharing your solution! :slight_smile:

-Tommy