Hello Everybody
Description
I need to update a JWT app to SDK meetings app before deprecation.
I did create a new SDK app from Marketplace and I got a new Client Id and Client secret to use.
Following the instructions on:
https://marketplace.zoom.us/docs/guides/build/jwt-app/jwt-app-migration/
I replaced api key and secret with the new Client id and Client secret and updated signature generation with the new keys.
I tested the new credentials with the sample app zoom-sdk-web-2.10.1, which worked perfectly
I updated the html of my web app to the new version 2.10.1 but i keep getting a signature error.
Browser Console Error
method: ājoinā, status: false, result: āInvalid signature.ā, errorMessage: āSignature is invalid.ā, errorCode: 3712
Which Web Meeting SDK version?
version 2.10.1
Meeting SDK Code Snippets
//This is the JS code for the Join function
function Join() {
var url = "https://dev.learningleaders.com/modules/zoom/credentials.php?";
var sdkKey = "4r5dbBgSRneDqTkY65K5Q";
var meeting_number = URL_GetParam("meeting_number");
var password = URL_GetParam("password");
var role = URL_GetParam("role");
var user_name = URL_GetParam("user_name");
console.log(user_name);
Request_Load(
url +
"sdkKey=" +
sdkKey +
"&meeting_number=" +
meeting_number +
"&role=" +
role,
function (signature) {
ZoomMtg.join({
signature: signature,
meetingNumber: meeting_number,
userName: user_name,
sdkKey: sdkKey,
passWord: password,
success: (success) => {
console.log(success);
},
error: (error) => {
console.log(error);
},
});
}
);
}
// This is the credential.php code to generate the signature
<?PHP
$sdkKey = $_REQUEST["sdkKey"];
$meeting_number = $_REQUEST["meeting_number"];
$role = $_REQUEST["role"];
$sdk_secret = "redacted";
//Set the timezone to UTC
date_default_timezone_set("UTC");
$time = time() + 60 * 60 * 2;; //time in seconds
$data = base64_encode($sdkKey . $meeting_number . $time . $role);
$hash = hash_hmac('sha256', $data, $sdk_secret, true);
$_sig = $sdkKey . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);
$signature = rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
echo $signature;
?>
Troubleshooting Routes
Please note I already tried changing different versions of zoom integration.
I was using 2.4 with JTW and tried 2.7 , 2.8 and finally 2.10.1 with SDK.
I tried reading the forum for inspiration but i didnāt find a real solution that applies to me.
The error would suggest I am still using a JWT key but I am not.
I also tried a different code to generate siganture, as suggested on the Forum.
Everything i tried DID generate a signature but always an invalid one.
Credential are working on the sample app and the php code works as it does generate a signature.
time is in seconds and not in milliseconds as suggested on other similar topics.
I am open to suggestions.
Device (please complete the following information):
- Device: Personal PC
- OS: Windows
- Browser: Chrome latest version