We have integrated the web SDK into our PHP & JS website for the purpose of setting up a webinar for auctions.
I’ve included the following head scripts:
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<!-- For Component and Client View - ZOOM -->
<script src="https://source.zoom.us/2.6.0/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/2.6.0/lib/vendor/react-dom.min.js"></script>
<!-- For Component View -->
<script src="https://source.zoom.us/2.6.0/zoom-meeting-embedded-2.6.0.min.js"></script>
</head>
The signature is generated and hosted on Heroku as explained here:
and the join() function is set as follows:
<script type="text/javascript">
// signature endpoint
var settings = {
"url": "https://meetingsdk-signature.herokuapp.com/?meetingNumber=82876307071&role=1",
"method": "POST",
"timeout": 0,
};
// fetch signature
$.ajax(settings).done(function (response) {
//console.log('Base64 Signature (decode for info): ' + response.signature);
localStorage.setItem('zoom_signature', response.signature);
});
const client = ZoomMtgEmbedded.createClient();
let meetingSDKElement = document.getElementById('meetingSDKElement');
client.init({
debug: true,
zoomAppRoot: meetingSDKElement,
language: 'en-US',
customize: {
meetingInfo: [
'topic',
'host',
'mn',
'pwd',
'telPwd',
'invite',
'participant',
'dc',
'enctype',
],
toolbar: {
buttons: [
{
text: 'Custom Button',
className: 'CustomButton',
onClick: () => {
console.log('custom button');
}
}
]
}
}
});
client.join({
sdkKey: '************************************', // redacted for privacy
signature: localStorage.getItem('zoom_signature'), // role in SDK Signature is set to 1 when admin (systems@parkvillage.africa) joins. Else 0
meetingNumber: '82876307071',
password: '', // not needed. Only for pass protected meetings
userName: 'Online Auction',
userEmail: 'systems@parkvillage.africa',
zak: "eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInpt......." // redacted for privacy
})
</script>
For the time being and while in development, the signature is renewed when the page is reloaded. It’s also important to note that I did include type=zak
in my zak request when fetching my ZAK token manually with Postman:
https://api.zoom.us/v2/users/me/token?type=zak
Everything appears to be set up correctly, however, im faced with the following error: “Not support to start meeting via tokens”
Console: