# Invalid signature with error code 3712

**URL:** <https://devforum.zoom.us/t/invalid-signature-with-error-code-3712/52550>\
**Category:** Web\
**Created:** [June 16, 2021, 7:31am UTC](https://devforum.zoom.us/t/invalid-signature-with-error-code-3712/52550 "2021-06-16T07:31:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prova9prova9prova9pr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prova9prova9prova9pr/32/24051_2.png) [@prova9prova9prova9pr](https://devforum.zoom.us/u/prova9prova9prova9pr)\
**Post date:** [June 16, 2021, 7:31am UTC](https://devforum.zoom.us/t/invalid-signature-with-error-code-3712/52550/1 "2021-06-16T07:31:40Z")

</div>

**Description**  
Hi, i have an error with the signature.

I use this function to generate it, but the error persist.

```auto
function generate_signature($api_key, $api_secret, $meeting_number, $role) {
	$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 rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
}

```

If i change the time, for example `30000` with `100000` i have the same error, but if i change `time() * 1000 + 30000` return me ‘The signature has expired.’, and its correct, with an error code 3705, how can i solve this problem?

**Which Web Client SDK version?**  
I am using the 1.9.5

**Screenshot**  
 ![zoom](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/3/e34ee8954cb5e537119261311e497f58d9efd6b5.png)

---

<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:** [June 18, 2021, 5:21am UTC](https://devforum.zoom.us/t/invalid-signature-with-error-code-3712/52550/2 "2021-06-18T05:21:02Z")

</div>

Hey @prova9prova9prova9pr,

Thank you for reaching out to the Zoom Developer Forum. First, please make sure that you are using your API Key and Secret from your [JWT App](https://marketplace.zoom.us/docs/guides/auth/jwt) for your credentials.

You may also want to make sure that your server is using a UTC timezone when generating the signature.

Let me know if that helps.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![prova9prova9prova9pr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prova9prova9prova9pr/32/24051_2.png) [@prova9prova9prova9pr](https://devforum.zoom.us/u/prova9prova9prova9pr)\
**Post date:** [June 18, 2021, 7:30am UTC](https://devforum.zoom.us/t/invalid-signature-with-error-code-3712/52550/3 "2021-06-18T07:30:05Z")

</div>

Yes i solved the problem, thanks so much!

---

<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:** [June 22, 2021, 5:51pm UTC](https://devforum.zoom.us/t/invalid-signature-with-error-code-3712/52550/4 "2021-06-22T17:51:49Z")

</div>

Great! I’m glad that helped! I’ll go ahead and close this topic now but feel free to open a new topic if you encounter any further issues or questions.

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:** [June 22, 2021, 5:51pm UTC](https://devforum.zoom.us/t/invalid-signature-with-error-code-3712/52550/5 "2021-06-22T17:51:57Z")

</div>

Closed on June 22, 2021, 5:51pm UTC


