I have created app using Ionic Capacitor + Angular and installed @zoom/meetingsdk package into it. I’ve created meeting sdk app in zoom marketplace. And I am using Zoom signature generation project for generating signature. Following is my frontend code:
import { Component, Inject, NgZone } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { DOCUMENT } from '@angular/common';
import { ZoomMtg } from '@zoom/meetingsdk';
ZoomMtg.preLoadWasm();
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
authEndpoint = 'http://localhost:4000'
sdkKey = /SDK KEY OF MY APP/
meetingNumber = /MEETING NUMBER OF MY SCHEDULED MEETING/
passWord = /PASSWORD OF MEETING/
role = 1
userName = 'Shruti'
userEmail = '[email protected]'
registrantToken = ''
zakToken = ''
leaveUrl = 'http://localhost:8100'
constructor(public httpClient: HttpClient, private ngZone: NgZone) { }
getSignature() {
this.httpClient.post(this.authEndpoint, {
meetingNumber: this.meetingNumber,
role: this.role
}).toPromise().then((data: any) => {
if (data.signature) {
console.log(data.signature)
this.startMeeting(data.signature)
} else {
console.log(data)
}
}).catch((error) => {
console.log(error)
})
}
startMeeting(signature: any) {
let container = document.getElementById('zmmtg-root');
if (container)
container.style.display = 'block'
this.ngZone.runOutsideAngular(() => {
ZoomMtg.init({
leaveUrl: this.leaveUrl,
isSupportAV: true,
patchJsMedia: true,
leaveOnPageUnload: true,
success: (success: any) => {
console.log(success, "Init success");
ZoomMtg.join({
signature: signature,
sdkKey: this.sdkKey,
meetingNumber: this.meetingNumber,
passWord: this.passWord,
userName: this.userName,
userEmail: this.userEmail,
// tk: this.registrantToken,
// zak: this.zakToken,
success: (success: any) => {
console.log(success, "Join success")
},
error: (error: any) => {
console.log(error, "Join Error")
}
})
},
error: (error: any) => {
console.log(error, "Init Error")
}
})
})
}
}
And getting below error in join method:
{
“method”: “join”,
“status”: false,
“result”: “Invalid signature.”,
“errorCode”: 3712,
“errorMessage”: “Signature is invalid.”
}
How to fix this?
Any help would be appreciated.
Thank you in advance.
Shruti Patel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.