I am getting the following response from Zoom when I try to join a meeting as the meeting organizer:
{“type”:“JOIN_MEETING_FAILED”,“reason”:“Fail to join the meeting.”,“errorCode”:200}
Thing is, it does not happen when I join the meeting as a mere participant. It happens when I am the meeting organizer joining the meeting.
Here is the Javascript code:
function startMeet(meetingId) {
if (!meetingId) {
jQuery('#errorWarn').html('ERROR - meeting ID does not exist');
return;
} else {
jQuery('#errorWarn').html('');
}
const iat = Math.round(new Date().getTime() / 1000) - 30;
const exp = iat + 60 * 60 * 2;
const oHeader = {alg: 'HS256', typ: 'JWT'};
const oPayload = {
sdkKey: '<?= $sdkkey ?>',
appKey: '<?= $sdkkey ?>',
mn: meetingId,
role: 1,
iat: iat,
exp: exp,
tokenExp: exp
}
const sHeader = JSON.stringify(oHeader);
const sPayload = JSON.stringify(oPayload);
const sdkJWT = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, '<?= $sdkSecret ?>');
const client = ZoomMtgEmbedded.createClient();
let meetingSDKElement = document.getElementById('zmmtg-root');
$.ajax(
{
method: "GET",
url: "/providers/getZoomDak",
}).done(function (msg) {
msg = JSON.parse(msg);
client.init({
debug: true,
language: 'en-US',
zoomAppRoot: meetingSDKElement,
enforceMultipleVideos: true, minimumParticipantsForGalleryView: 2,
customize: {video: {disableDraggable: true, isResizable: false, viewSizes: {default: {width: 800, height: 500}, ribbon: {width: 300, height: 700}}}}
}).then(() => {
client.join({
signature: sdkJWT,
meetingNumber: meetingId,
userName: "<?= $_SESSION['web']['providers']['provider']['titulo'] . ' ' . $_SESSION['web']['providers']['provider']['nombre'] . ' ' . $_SESSION['web']['providers']['provider']['apellido'] ?>",
sdkKey: '<?= $sdkkey ?>',
password: '123456',
zak: msg.zak,
success: (success) => {
alert(success)
},
error: (error) => {
alert(JSON.stringify(error));
}
}).then(() => {
alert('joined successfully')
}).catch((error) => {
alert(JSON.stringify(error));
})
}).catch((error) => {
alert(JSON.stringify(error));
})
});
}
Notice the role is 1. It doesn’t happen when role is not 1. I already check the response from https://api.zoom.us/v2/users/me/token/?type=zak. Nothing wrong there. I am using version 3.1.6, and before that I was using version 2.17.0.
I have run out of options. Don’t know what’s going on anymore.