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 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 - https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/signature#simple-signature-setup

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

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