Hi everybody,
I am trying to add the sdk client (for a poc), the idea is to push to use zoom in the company with the SDK. But when I want to create and join the room I have :
I will share my config to understand :
Using: VUEJS
install sdk: only with the npm do not know if I need more, I saw that react was include inside the module
My signature (POC) :
const apiKey = ‘MY KEY’
const apiSecret = 'MY SECRET '
const meetingNumber = 1234
const role = 1
console.log(process.env.VUE_APP_ZOOM_KEY)
const timestamp = new Date().getTime() - 30000;
const msg = Buffer.from(apiKey + apiSecret + timestamp + role).toString(
"base64"
);
const hash = crypto
.createHmac("sha256", apiSecret)
.update(msg)
.digest("base64");
const signature = Buffer.from(
`${apiKey}.${meetingNumber}.${timestamp}.${role}.${hash}`
).toString("base64");
return res.send({ message: signature });
And I did the init :
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
ZoomMtg.setZoomJSLib("node_modules/@zoomus/websdk/dist/lib", "/av");
const response = axios.post(`${process.env.VUE_APP_BACK_URL}/room/signature`)
this.signature = response.data
let vm = this;
ZoomMtg.init({
leaveUrl: this.meetConfig.leaveUrl,
isSupportAV: true,
success: function() {
console.log(this)
ZoomMtg.join({
signature: vm.signature,
apiKey: process.env.VUE_APP_ZOOM_KEY,
meetingNumber: 1234,
userName: vm.meetConfig.userName,
// password optional; set by Host
success: (success) => {
console.log(success)
},
error: (error) => {
console.log(error)
}
})
}
})
},