We are experiencing an issue with our zoom app (let’s say: App1). When attempting to join a meeting using this app, the application displays the error code 3712 with the message: “Signature is invalid.” I am attaching a screenshot of the error here.
Our frontend technology is angular. For meeting SDK , we used the npm ‘@zoom/meetingsdk’.
zoomMtg.join({
{
sdkKey: environment.ClientID,
signature: "<signatureVal>",
meetingNumber: "<meeting_idVal>",
passWord: "<passwordVal>",
userName: "<userNameVal>",
userEmail: "<emailVal>",
customerKey: "<registrant_idVal>",
tk: "<tkValue>",
success: (success:any) => {
console.log('zoom join success:',success);
},
error: (error:any) => {
console.log('zoom join error:',error);
}
}
})
function generateSignature(meetingNumb, role) {
//utc timestamp
const iat = Math.round(new Date().getTime() / 1000) - 30;
const exp = iat + 60 * 60 * 2;//2hrs
const tokenExp = iat + 60 * 60 * 1.9;
const oHeader = { alg: 'HS256', typ: 'JWT' };
const oPayload = {
sdkKey: process.env.ClientID,
mn: meetingNumb,
role: role,
iat: iat,
exp: exp,
tokenExp: tokenExp
};
const sHeader = JSON.stringify(oHeader);
const sPayload = JSON.stringify(oPayload);
const signatureJWT = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, process.env.ClientSecret);
return signatureJWT;
}
To troubleshoot, I created another app, App2, in the same account, and joining meetings works fine with this new app—there is no “Signature is invalid” error. This new app is the same copy of the ‘App1’ app.
Could you please assist us in identifying and resolving the issue with App1 zoom app?
Thanks In Advance.