danish
(Danish)
October 28, 2019, 5:41am
1
Hi There,
My code for join the meeting using Web SDK is working on Linux server but in my local mac, it is not working. I am getting this error message.
localJsonpCallback({“status”:false,“errorCode”:200,“errorMessage”:“The signature has expired.”,“result”:null});
It was working before but after updating to macOS catalina. it started throwing this error. there are other post related to this error but none of the solution help me.
Thanks,
Ritesh
tommy
(Tommy Gaessler)
October 28, 2019, 8:49pm
2
Hey @danish ,
Can you please share the code you are using to generate the signature?
Also be aware of timezone differences between creation of the signature on your server vs. mac.
Thanks,
Tommy
danish
(Danish)
October 29, 2019, 8:36am
3
Hey tommy,
Thanks for quick response. Here is the code for generating signature.
/**
* Generate SDK signature for joining meeting
*
* @param int $meetingNumber
* @param int $role
* @return string
*/
public static function generateZoomSDKSignature($meetingNumber, $role)
{
$apiKey = config('project.zoomApiKey');
$apiSecret = config('project.zoomApiSecret');
$time = time() * 1000; //time in milliseconds
$data = base64_encode($apiKey . $meetingNumber . $time . $role);
$hash = hash_hmac('sha256', $data, $apiSecret, true);
$_sig = $apiKey . "." . $meetingNumber . "." . $time . "." . $role . "." . base64_encode($hash);
return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
}
Yes it is different timezone between server and local mac. I have tried to sent time from local so that the signature time should be same as local mac. But still i am getting the same error.
tommy
(Tommy Gaessler)
October 29, 2019, 6:22pm
4
Hey @danish ,
Thanks for sending this. To confirm, you are using the API Key and Secret from a JWT app type correct?
Possible duplicates with solutions:
Hi Tommy,
I have one question, for the above error, is timezone / timestamp matters for generating the signature?
Let me share you today’s experience with you.
While doing the analysis, we have compared the time present on mine system VS time present on the colleague system where this application is running fine. There was difference of 7 mins. Mine system is 7 mins ahead as compare to the other one.
We did many R&D changes to calculate the signature. Later on we had minuses the 7 mins (conv…
Let me know if those help.
Thanks,
Tommy
danish
(Danish)
November 4, 2019, 1:12pm
5
Hi Tommy,
I just subtract time by just 1 min and it start working. Anyway thanks for response.
Thanks,
Ritesh
1 Like
Hi @danish ,
Glad that you got it working. Let us know if you need anything else!
Thanks
1 Like