Dear Zoom Support Team,
I am currently integrating the Zoom Meeting SDK into our web application, but I am encountering an “Invalid signature” error when attempting to join a meeting. Despite following the documentation and testing with the sample web SDK, the issue still exists.
@hamzasuleman Hope you will be fine.
Here is NodeJS sample
function generateSignature(meetingNumber, role) {
const iat = Math.round(new Date().getTime() / 1000) - 30;
const exp = iat + 60 * 60 * 2
const oHeader = {
alg: 'HS256',
typ: 'JWT'
}
const oPayload = {
sdkKey: process.env.ZOOM_APP_KEY,
mn: meetingNumber,
role: role,
iat: iat,
exp: exp,
appKey: process.env.ZOOM_APP_KEY,
tokenExp: iat + 60 * 60 * 2
}
const sHeader = JSON.stringify(oHeader)
const sPayload = JSON.stringify(oPayload)
const signature = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, process.env.ZOOM_APP_SECRET)
return signature;
}
And here is valid payload params
{
"sdkKey": "ajQ8mmtQ_GKxIzGCg4XSA",
"mn": 87954282182,
"role": 1,
"iat": 1714569281,
"exp": 1714576481,
"appKey": "ajQ8mmtQ_GKxIzGCg4XSA",
"tokenExp": 1714576481
}
Thanks
Please let us know if the information provide helps!
Yes, the issue is resolved.
1 Like
Glad to hear this was resolved!