# Javascript Web SDK The signature has expired

**URL:** <https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431>\
**Category:** Web\
**Created:** [October 28, 2019, 5:41am UTC](https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431 "2019-10-28T05:41:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![danish](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@danish](https://devforum.zoom.us/u/danish)\
**Post date:** [October 28, 2019, 5:41am UTC](https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431/1 "2019-10-28T05:41:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 28, 2019, 8:49pm UTC](https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431/2 "2019-10-28T20:49:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![danish](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@danish](https://devforum.zoom.us/u/danish)\
**Post date:** [October 29, 2019, 8:36am UTC](https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431/3 "2019-10-29T08:36:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 29, 2019, 6:22pm UTC](https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431/4 "2019-10-29T18:22:29Z")

</div>

Hey @danish,

Thanks for sending this. To confirm, you are using the API Key and Secret from a [JWT app type](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-jwt-app) correct?

Possible duplicates with solutions:

> [@ZoomMtg.join() returns “The signature has expired.” help me please](https://devforum.zoom.us/t/zoommtg-join-returns-the-signature-has-expired-help-me-please/4805/17):
>
> 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…

> [@No privilege to my account on 60 days free trial](https://devforum.zoom.us/t/no-privilege-to-my-account-on-60-days-free-trial/5728/12):
>
> hi signature working fine now from link [https://marketplace.zoom.us/docs/sdk/native-sdks/Web-Client-SDK/tutorial/generate-signature](https://marketplace.zoom.us/docs/sdk/native-sdks/Web-Client-SDK/tutorial/generate-signature) shared thank you.

Let me know if those help.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![danish](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@danish](https://devforum.zoom.us/u/danish)\
**Post date:** [November 4, 2019, 1:12pm UTC](https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431/5 "2019-11-04T13:12:44Z")

</div>

Hi Tommy,

I just subtract time by just 1 min and it start working. Anyway thanks for response.

Thanks,  
Ritesh

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [November 4, 2019, 6:47pm UTC](https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431/6 "2019-11-04T18:47:12Z")

</div>

Hi @danish,

Glad that you got it working. Let us know if you need anything else!

Thanks

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:01pm UTC](https://devforum.zoom.us/t/javascript-web-sdk-the-signature-has-expired/6431/7 "2020-08-21T19:01:49Z")

</div>

Closed on August 21, 2020, 7:01pm UTC


