Description I am encountering a JOIN_MEETING_FAILED
error with errorCode: 200
when attempting to join a Zoom meeting using the Web Meeting SDK. Despite following the SDK documentation and ensuring all parameters are correctly configured, the error persists.
Browser Console Error
json
{
"type": "JOIN_MEETING_FAILED",
"reason": "Fail to join the meeting.",
"errorCode": 200
}
Which Web Meeting SDK version? @zoomus/websdk: ^2.18.3
Meeting SDK Code Snippets Here is the relevant code causing the error:
javascript
import React, { useState } from 'react';
import Modal from 'react-modal';
import ZoomMtgEmbedded from '@zoomus/websdk/embedded';
import axios from 'axios';
Modal.setAppElement('#root');
const ZoomSession = () => {
const [modalIsOpen, setModalIsOpen] = useState(false);
const client = ZoomMtgEmbedded.createClient();
const sdkKey = 'I88IuIk9RxCkFj6FsHrBCA';
const meetingNumber = '84481362651';
const passWord = '5fgt6U';
const role = 0;
const userName = 'f';
const userEmail = '';
const registrantToken = '';
const zakToken = '';
const generateSignature = async (meetingNumber, role) => {
try {
const response = await axios.post(`${process.env.REACT_APP_BASE_URL}/api/v1/zoom/authEndpoint`, {
meetingNumber: meetingNumber,
role: role
});
return response.data.signature;
} catch (error) {
console.error('Error generating signature:', error);
throw error;
}
};
const getSignature = async (e) => {
e.preventDefault();
try {
const signature = await generateSignature(meetingNumber, role);
startMeeting(signature);
} catch (error) {
console.error('Error getting signature:', error);
}
};
const startMeeting = (signature) => {
const meetingSDKElement = document.getElementById('meetingSDKElement');
client.init({
debug: true,
zoomAppRoot: meetingSDKElement,
language: 'en-US',
patchJsMedia: true,
leaveOnPageUnload: true
}).then(() => {
client.join({
signature: signature,
sdkKey: sdkKey,
meetingNumber: meetingNumber,
password: passWord,
userName: userName,
userEmail: userEmail,
tk: registrantToken,
zak: zakToken
}).then(() => {
console.log('Joined meeting successfully');
}).catch((error) => {
console.error('Error joining meeting:', error);
});
}).catch((error) => {
console.error('Error initializing Zoom client:', error);
});
};
return (
<div className="App">
<main>
<h1>Zoom Meeting</h1>
<button onClick={() => setModalIsOpen(true)}>Join Meeting</button>
<Modal
isOpen={modalIsOpen}
onRequestClose={() => setModalIsOpen(false)}
contentLabel="Zoom Meeting"
style={{
content: {
top: '50%',
left: '50%',
right: 'auto',
bottom: 'auto',
marginRight: '-50%',
transform: 'translate(-50%, -50%)',
width: '80%',
height: '80%'
}
}}
>
<div id="meetingSDKElement"></div>
<button onClick={getSignature}>Start Meeting</button>
</Modal>
</main>
</div>
);
};
export default ZoomSession;
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJJODhJdUlrOVJ4Q2tGajZGc0hyQkNBIiwibW4iOiI4NDQ4MTM2MjY1MSIsInJvbGUiOjAsImlhdCI6MTcyMTM3MjU2OSwiZXhwIjoxNzIxNDQ0NTY5LCJhcHBLZXkiOiJJODhJdUlrOVJ4Q2tGajZGc0hyQkNBIiwidG9rZW5FeHAiOjE3MjE0NDQ1Njl9.5IiscW75oRQACUtXbKja5OZr97i_glVcW589sV4RaB4
GpL23CzMZvb1MF8yPw88MhTEVlFDFE8z - client secret