WEB SDK CDN 1.7.10 - Signature is invalid

Description
I am trying to join an pro account opened meeting w trough the web sdk, and im always getting the error code “Signature is invalid”.
The signature is generated on node.

I really need your help because i don#t know whats wrong :confused:

Thanks for your help!

Signature Code:

const router = require(‘express’).Router();
const crypto = require(‘crypto’);
router.post(’/signature’, async function (req, res, /* next */)
{
if (typeof req.body.meetingNumber === ‘undefined’ || typeof req.body.role === ‘undefined’)
{
res.sendStatus(401);
return;
}
const apiKey = ‘{XXX}’;
const secretKey = ‘{XXX}’;
const timestamp = new Date().getTime() - 30000;
const message = Buffer.from(apiKey + req.body.meetingNumber + timestamp + req.body.role).toString(‘base64’);
const hash = crypto.createHmac(‘sha256’, secretKey).update(message).digest(‘base64’);
const signature = Buffer.from(${apiKey}.${req.body.meetingNumber}.${timestamp}.${req.body.role}.${hash}).toString(‘base64’);
const responseData =
{
signature: signature
};
res.json(responseData);
});

Client Code:

zoomConfig = {
apiKey: API_KEY,
meetingNumber: ***********,
userName: displayname,
passWord: “378704”,
leaveUrl: “”,
role: 0
};

zoomConfigSignature =
{
“meetingNumber”: ***********,
“role”: 0
}

function initZoom(){
fetch(https://gda-jurysitzung.eventvote.de:8080/crypt/signature, {
method: ‘POST’,
headers:
{
‘Content-Type’: ‘application/json’
},
body: JSON.stringify(zoomConfigSignature)
})
.then(result => result.text())
.then(response => {
zoomSignature = JSON.parse(response);
ZoomMtg.init({
leaveUrl: ‘http://www.zoom.us’,
isSupportAV: true,
success: function () {
ZoomMtg.join(
{
signature: zoomSignature.signature,
meetingNumber: zoomConfig.meetingNumber,
userName: zoomConfig.userName,
apiKey: zoomConfig.apiKey,
userEmail: “test@web.de”,
passWord: zoomConfig.passWord,
success: function(success){
console.log(‘join meeting success’);
},
error: function(error) {
console.log(error);
}
}
);
},
error: function(res) {
console.log(res);
}
});
})
}

Error

  1. Object
  2. errorCode: 3712
  3. errorMessage: “Signature is invalid.”
  4. method: “join”
  5. result: “Invalid signature.”
  6. status: false
  7. proto: Object

It always shows me the same error.

Which version?
WEB SDK CDN 1.7.10

Smartphone (please complete the following information):

  • Browser:[e.g. Chrome]

*This post has been edited to remove any meeting / webinar IDs

We are getting a correct signature i think : signature: “Unk2Z2dlY0ZCbHNLZTk5cDJONk1kbDY5OGtweG9WMjVzZ0hGLjkxNjY5Nzg3NTI5LjE1OTU0ODcwMjQ3OTguMC5qNWZ4Q2x6eWZFSmZRMTFUSUJyZnJZWThwRjFReXBmMGtLL3RvTE5oSG5rPQ==”

And the right credentails are included into the signature generator

Hey @j.kassner,

Please see the solution to your question here:

Thanks,
Tommy