# Zoom Web SDK “Signature is invalid” 3712 error code

**URL:** <https://devforum.zoom.us/t/zoom-web-sdk-signature-is-invalid-3712-error-code/62785>\
**Category:** API and Webhooks\
**Created:** [January 17, 2022, 8:39pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-signature-is-invalid-3712-error-code/62785 "2022-01-17T20:39:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stahl](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/stahl/32/34181_2.png) [@stahl](https://devforum.zoom.us/u/stahl)\
**Post date:** [January 17, 2022, 8:39pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-signature-is-invalid-3712-error-code/62785/1 "2022-01-17T20:39:37Z")

</div>

**Description**  
We create a sample script, how it is described on [https://marketplace.zoom.us/docs/sdk/native-sdks/web/signature](https://marketplace.zoom.us/docs/sdk/native-sdks/web/signature) but cannot join, we always became an error with signature. We also try to use the described service, to generate a signature, but also the same issue.

**Error**

1. {method: “join”, status: false, result: “Invalid signature.”, errorMessage: undefined, errorCode: 3712}
2. errorCode: 3712
3. errorMessage: undefined
4. method: “join”
5. result: “Invalid signature.”

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT

**Which Endpoint/s?**  
Web SDK 2.1.1

**How To Reproduce (If applicable)**

```auto
<?php

$api_key = '8CTcTLrpQr-J_9P6xtiJDg';
$api_secret = 'XYZ';
$meeting_number = 86764390572;

$signature = generate_signature($api_key, $api_secret, $meeting_number, 0);

function generate_signature ( $api_key, $api_secret, $meeting_number, $role){
  //Set the timezone to UTC
  date_default_timezone_set("UTC");
  $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_secret, true);
  $_sig = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);
  return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
}
?>
<html>
<head>
    <!-- For Web Client View: import Web Meeting SDK CSS -->
    <link type="text/css" rel="stylesheet" href="https://source.zoom.us/2.1.1/css/bootstrap.css" />
    <link type="text/css" rel="stylesheet" href="https://source.zoom.us/2.1.1/css/react-select.css" />
</head>

<body>

<script>
  // make an http request to your server to get the signature
  document.onreadystatechange = function () {
    if (document.readyState == "complete") {
      ZoomMtg.preLoadWasm();
      ZoomMtg.prepareWebSDK();
      // loads language files, also passes any error messages to the ui
      ZoomMtg.i18n.load('de-DE');
      ZoomMtg.i18n.reload('de-DE');

      // For Global, use source.zoom.us:
      ZoomMtg.setZoomJSLib('https://source.zoom.us/2.1.1/lib', '/av');

      var leaveUrl = 'https://www.test.com'

      ZoomMtg.init({
        leaveUrl: leaveUrl,
        success: (success) => {
          console.log(success)
          ZoomMtg.join({
            signature: '<?=$signature;?>',
            meetingNumber: <?=$meeting_number;?>,
            userName: 'username',
            apiKey: '<?=$api_secret;?>',
            userEmail: 'mail@mail.com',
            //passWord: '',
            success: (success) => {
              console.log('ok');
              console.log(success)
            },
            error: (error) => {
              console.log('error');
              console.log(error)
            }
          });
        },
        error: (error) => {
          console.log(error)
        }
      });

    }
  }

</script>

<!-- For either view: import Web Meeting SDK JS dependencies -->
<script src="https://source.zoom.us/2.1.1/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/2.1.1/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/2.1.1/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/2.1.1/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/2.1.1/lib/vendor/lodash.min.js"></script>

<!-- For Component View -->
<script src="https://source.zoom.us/2.1.1/zoom-meeting-embedded-2.1.1.min.js"></script>

<!-- For Client View -->
<script src="https://source.zoom.us/zoom-meeting-2.1.1.min.js"></script>
</body>

</html>

```

**Screenshots (If applicable)**  
No

**Additional context**  
Here you have an example signature, generated right now 18.01.2022 08:07 (Zurich)

---

<div class="post-metadata">

**Author:** ![stahl](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/stahl/32/34181_2.png) [@stahl](https://devforum.zoom.us/u/stahl)\
**Post date:** [January 19, 2022, 3:22pm UTC](https://devforum.zoom.us/t/zoom-web-sdk-signature-is-invalid-3712-error-code/62785/2 "2022-01-19T15:22:00Z")

</div>

@tommy I read your the expert in signature issues 🙂 possible you can help us?

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [January 20, 2022, 2:15am UTC](https://devforum.zoom.us/t/zoom-web-sdk-signature-is-invalid-3712-error-code/62785/3 "2022-01-20T02:15:53Z")

</div>

Greeting, @stahl,

Welcome to the Developer Forum and thank you for posting. Can verify that you are using your API Key and Secret from your [JWT App](https://marketplace.zoom.us/docs/guides/auth/jwt) for your credentials. Also, you want to make sure that your server is using a UTC timezone when generating the signature. You reference our documentation for instructions on how to generate the Web SDK signature as well:

> **[Generate Signature - Web - Meeting SDKs - Zoom Software Development Kit (Zoom...](https://marketplace.zoom.us/docs/sdk/native-sdks/web/signature)**
>
> Generate Signature
> 
> 
> 
> Each request to start or join a Zoom Meeting or Webinar must be verified by an encrypted signature authorizing each user to enter....

You can also reference the Signature Generator Sample app to compare a working [signature](https://marketplace.zoom.us/docs/sdk/native-sdks/web/build/signature) with yours:

> **[GitHub - zoom/meetingsdk-sample-signature-node.js: Generate a signature to...](https://github.com/zoom/meetingsdk-sample-signature-node.js)**
>
> Generate a signature to Start and Join Meetings and Webinars with the Zoom Web Meeting SDK. - GitHub - zoom/meetingsdk-sample-signature-node.js: Generate a signature to Start and Join Meetings and ...

Let me know if this helps.

Best,  
Donte

---

<div class="post-metadata">

**Author:** ![stahl](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/stahl/32/34181_2.png) [@stahl](https://devforum.zoom.us/u/stahl)\
**Post date:** [January 20, 2022, 8:22am UTC](https://devforum.zoom.us/t/zoom-web-sdk-signature-is-invalid-3712-error-code/62785/4 "2022-01-20T08:22:00Z")

</div>

hi @donte.zoom thank you for your feedback. My Issue was, that we need to generate the signature quick before join process. so you can close this issue

---

<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 25, 2022, 12:09am UTC](https://devforum.zoom.us/t/zoom-web-sdk-signature-is-invalid-3712-error-code/62785/5 "2022-01-25T00:09:32Z")

</div>

@stahl Thanks for following up and sharing your solution

---

<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 25, 2022, 12:09am UTC](https://devforum.zoom.us/t/zoom-web-sdk-signature-is-invalid-3712-error-code/62785/6 "2022-01-25T00:09:40Z")

</div>

Closed on January 25, 2022, 12:09am UTC


