# \[Web SDK\] Random "Joining meeting timeout. Signature is invalid" error

**URL:** <https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866>\
**Category:** Web\
**Created:** [July 22, 2020, 12:20pm UTC](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866 "2020-07-22T12:20:33Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![umesh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/umesh/32/7556_2.png) [@umesh](https://devforum.zoom.us/u/umesh)\
**Post date:** [October 13, 2020, 3:30am UTC](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866/24 "2020-10-13T03:30:37Z")

</div>

Our server runs on us-west region. We can see “No Permission” error in console. We are using CDN version.

---

<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 13, 2020, 6:30pm UTC](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866/25 "2020-10-13T18:30:06Z")

</div>

Hey @umesh,

Can you share your Web SDK signature for a test meeting so I can debug further?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![eclypsegroup](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/eclypsegroup/32/21865_2.png) [@eclypsegroup](https://devforum.zoom.us/u/eclypsegroup)\
**Post date:** [January 21, 2021, 7:53pm UTC](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866/26 "2021-01-21T19:53:12Z")

</div>

I have a similar problem

I’m testing a web app with zoom  
The test meeting is

If I try to create the signature with js with this function

```
function subjs () {
	console.log("JS - TEST");
	n=(new Date).getTime()-3e4;
	console.log(n);
	var signature = ZoomMtg.generateSignature({
		meetingNumber: meetingConfig.mn,
		apiKey: API_KEY,
		apiSecret: API_SECRET,
		role: meetingConfig.role,
		success: function (res) {
			console.log(res.result);
		},
	});
}

```

the following data is generated for me:  
Time: 1611258293742  
Signature:

and everything works fine

If instead I try to create the signature with PHP with the following function

```
date_default_timezone_set('UTC');
$time = (time() * 1000) - 30000;
$data = base64_encode($api_key . $meeting_number . $time . $role);
$hash = hash_hmac('sha256', $data, $api_secret, true);
$_sig = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);

// return signature, url safe base64 encoded
echo " --- ".$time;
echo rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');

```

the following data is generated for me:  
Time: 1611258294000  
Signature:

But in this case it doesn’t work

Where am I wrong?

Thanks

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [January 21, 2021, 10:57pm UTC](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866/27 "2021-01-21T22:57:32Z")

</div>

Hey @eclypsegroup,

Thank you for reaching out to the Zoom Developer Forum. Have you tried removing the line setting the timezone? This looks like it would be the right move but I just want to make sure that it’s not interfering with the signature generation. When you logged these functions, was it at the same time?

Also, are you seeing any errors in the PHP error\_log?

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![abhishek.gupta2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/abhishek.gupta2/32/27516_2.png) [@abhishek.gupta2](https://devforum.zoom.us/u/abhishek.gupta2)\
**Post date:** [May 25, 2021, 3:03pm UTC](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866/28 "2021-05-25T15:03:10Z")

</div>

Hi i am join to the meeting then facing an error “joining meeting timeout” and “signature is invalid” but I pass all write parameters and details. please help me, somebody.  
also how to store this $\_sig variable value in meeting.js signature variable

 \<?php //die("dddddd"); $api\_key='9KqEY0EZFoad7s8sq7GkyEsZ30Bgydd0qkhV'; $api\_sercet='YKdG78n3qaAwTYSCF56kkz29YyDQlyK9IEkf'; $meeting\_number=97843021700; $role=0; function generate\_signature( $api\_key, $api\_sercet, $meeting\_number, $role){ $time = time() \* 1000 - 30000; //time in milliseconds (or close enough) $data = base64\_encode($api\_key . $meeting\_number . $time . $role); $hash = hash\_hmac('sha256', $data, $api\_sercet, true); $\_sig = $api\_key . "." . $meeting\_number . "." . $time . "." . $role . "." . base64\_encode($hash); //return rtrim(strtr(base64\_encode($\_sig), '+/', '-\_'), '='); } generate\_signature( $api\_key, $api\_sercet, $meeting\_number, $role); ?\>

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [May 26, 2021, 10:40pm UTC](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866/29 "2021-05-26T22:40:24Z")

</div>

Hey @abhishek.gupta2,

Thank you for reaching out to the Zoom Developer Forum. Please send an email to [developersupport@zoom.us](mailto:developersupport@zoom.us) with a link to this thread. In that email, please include the signature that you’re using.

I’ll use that to investigate further.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [May 26, 2021, 10:40pm UTC](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866/30 "2021-05-26T22:40:26Z")

</div>

Closed on May 26, 2021, 10:40pm UTC



[Previous page](https://devforum.zoom.us/t/web-sdk-random-joining-meeting-timeout-signature-is-invalid-error/24866.md?page=1)
