Try to join zoom Meeting Using signature everytime it is throw error like below
{
“method”: “join”,
“status”: false,
“result”: “Invalid signature.”,
“errorCode”: 3712,
“errorMessage”: “Signature is invalid.”
}
step for creating signature using NodeJS
Node version: 20
jsrsasign: ^11.1.0
const getMsdkSignature = asyncHandler(async (req, res) => {
// const iat = Math.round(new Date().getTime() / 1000) - 30;
const iat = Math.floor(new Date().getTime() / 1000)
const exp = iat + 60 * 60 * 2;
const oHeader = { alg: “HS256”, typ: “JWT” };
const oPayload = {
sdkKey: process.env.CLIENT_ID,
appKey: process.env.CLIENT_ID,
mn: req.body.meetingNumber,
role: req.body.role,
iat: iat,
exp: exp,
tokenExp: exp,
};
const sHeader = JSON.stringify(oHeader);
const sPayload = JSON.stringify(oPayload);
let signature = KJUR.jws.JWS.sign(
“HS256”,
sHeader,
sPayload,
process.env.CLIENT_SECRET
);
res.json({
signature: signature,
});
});