# WEB SDK CDN 1.7.10 - Signature is invalid

**URL:** <https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888>\
**Category:** Web\
**Created:** [July 22, 2020, 3:03pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888 "2020-07-22T15:03:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.kassner](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@j.kassner](https://devforum.zoom.us/u/j.kassner)\
**Post date:** [July 22, 2020, 3:03pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/1 "2020-07-22T15:03:33Z")

</div>

**Description**  
I am trying to join an pro account opened meeting w trough the web sdk, and im always getting the error code “Signature is invalid”.  
The signature is generated on node.

I really need your help because i don#t know whats wrong 😕

Thanks for your help!

Signature Code:

> const router = require(‘express’).Router();  
> const crypto = require(‘crypto’);  
> router.post(‘/signature’, async function (req, res, /\* next \*/)  
> {  
> if (typeof req.body.meetingNumber === ‘undefined’ || typeof req.body.role === ‘undefined’)  
> {  
> res.sendStatus(401);  
> return;  
> }  
> const apiKey = ‘{XXX}’;  
> const secretKey = ‘{XXX}’;  
> const timestamp = new Date().getTime() - 30000;  
> const message = Buffer.from(apiKey + req.body.meetingNumber + timestamp + req.body.role).toString(‘base64’);  
> const hash = crypto.createHmac(‘sha256’, secretKey).update(message).digest(‘base64’);  
> const signature = Buffer.from(`${apiKey}.${req.body.meetingNumber}.${timestamp}.${req.body.role}.${hash}`).toString(‘base64’);  
> const responseData =  
> {  
> signature: signature  
> };  
> res.json(responseData);  
> });

Client Code:

> zoomConfig = {  
> apiKey: API\_KEY,  
> meetingNumber: \*\*\*\*\*\*\*\*\*\*\*,  
> userName: displayname,  
> passWord: “378704”,  
> leaveUrl: “”,  
> role: 0  
> };
> 
> zoomConfigSignature =  
> {  
> “meetingNumber”: \*\*\*\*\*\*\*\*\*\*\*,  
> “role”: 0  
> }
> 
> function initZoom(){  
> fetch(`https://gda-jurysitzung.eventvote.de:8080/crypt/signature`, {  
> method: ‘POST’,  
> headers:  
> {  
> ‘Content-Type’: ‘application/json’  
> },  
> body: JSON.stringify(zoomConfigSignature)  
> })  
> .then(result =\> result.text())  
> .then(response =\> {  
> zoomSignature = JSON.parse(response);  
> ZoomMtg.init({  
> leaveUrl: ‘[http://www.zoom.us](http://www.zoom.us)’,  
> isSupportAV: true,  
> success: function () {  
> ZoomMtg.join(  
> {  
> signature: zoomSignature.signature,  
> meetingNumber: zoomConfig.meetingNumber,  
> userName: zoomConfig.userName,  
> apiKey: zoomConfig.apiKey,  
> userEmail: “[test@web.de](mailto:test@web.de)”,  
> passWord: zoomConfig.passWord,  
> success: function(success){  
> console.log(‘join meeting success’);  
> },  
> error: function(error) {  
> console.log(error);  
> }  
> }  
> );  
> },  
> error: function(res) {  
> console.log(res);  
> }  
> });  
> })  
> }

**Error**

> 1. Object
> 2. errorCode: 3712
> 3. errorMessage: “Signature is invalid.”
> 4. method: “join”
> 5. result: “Invalid signature.”
> 6. status: false
> 7. **proto** : Object

It always shows me the same error.

**Which version?**  
WEB SDK CDN 1.7.10

**Smartphone (please complete the following information):**

- Browser:[e.g. Chrome]

\*This post has been edited to remove any meeting / webinar IDs

---

<div class="post-metadata">

**Author:** ![j.kassner](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@j.kassner](https://devforum.zoom.us/u/j.kassner)\
**Post date:** [July 23, 2020, 6:53am UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/3 "2020-07-23T06:53:25Z")

</div>

We are getting a correct signature i think : signature: “”

And the right credentails are included into the signature generator

---

<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:** [July 24, 2020, 6:58pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/4 "2020-07-24T18:58:09Z")

</div>

Hey @j.kassner,

Please see the solution to your question here:

> [@"Signuture is invalid" CDN 1.7.10 JS Viewer](https://devforum.zoom.us/t/signuture-is-invalid-cdn-1-7-10-js-viewer/24302/4):
>
> Hey @j.amelsberg, It appears you are using your SDK App Key and Secret to generate the signature. You need to use your JWT Key and Secret app to generate the signature. Thanks, Tommy

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![preciousfocus](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/preciousfocus/32/15557_2.png) [@preciousfocus](https://devforum.zoom.us/u/preciousfocus)\
**Post date:** [October 9, 2020, 4:20pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/5 "2020-10-09T16:20:37Z")

</div>

I keep getting “Signature is Invalid”.

The signature generated:

I am sure using JWT Credentials and NOT OAUTH.

This is frustrating.

Help please!

---

<div class="post-metadata">

**Author:** ![preciousfocus](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/preciousfocus/32/15557_2.png) [@preciousfocus](https://devforum.zoom.us/u/preciousfocus)\
**Post date:** [October 9, 2020, 5:00pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/6 "2020-10-09T17:00:23Z")

</div>

Now it works if the Web SDK Application is accessed via **127.0.0.1/path/to/project**.  
It keeps throwing “Signature is Invalid” when accessed via the [ngrok.io](http://ngrok.io) exposed url.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 12, 2020, 3:16pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/7 "2020-10-12T15:16:11Z")

</div>

Hey @preciousfocus,

How are you generating your signature? A few things to double check:

- Ensure that the JWT credentials you’re using belong to _your_ account
- Ensure you’re generating the timestamp correctly
- Verify that the meeting ID you’re passing is for a valid, already scheduled meeting

You may also find it helpful to use our signature generator tool hosted on heroku to make sure this is all being handled correctly:

> **[Generate Signature - Essential Guides - Web - Native SDKs - Zoom Software...](https://marketplace.zoomgov.com/docs/sdk/native-sdks/web/essential/signature)**
>
> Generate Signature
> 
> Each request to Start or Join a Meeting / Webinar must be verified by an encrypted signature authorizing the user to enter.
> 
> The sig...

Let me know if this helps!

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![preciousfocus](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/preciousfocus/32/15557_2.png) [@preciousfocus](https://devforum.zoom.us/u/preciousfocus)\
**Post date:** [October 12, 2020, 3:23pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/8 "2020-10-12T15:23:37Z")

</div>

Hey @will.zoom,  
As provided by Zoom, here’s how I generate signature:

```auto
function generate_signature ( $api_key, $api_secret, $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_secret, true);
	
	$_sig = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);
	
	//return signature, url safe base64 encoded
	return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
}

```

Yes, the JWT credentials belong to same account as the meeting.

The meeting ID is correct and works fine on Zoom.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 13, 2020, 6:45pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/9 "2020-10-13T18:45:55Z")

</div>

Hey @preciousfocus,

Thanks for sharing that. Are you on a Pro or higher Zoom plan? If you’re on a Basic plan, this could be causing the issue.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![preciousfocus](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/preciousfocus/32/15557_2.png) [@preciousfocus](https://devforum.zoom.us/u/preciousfocus)\
**Post date:** [October 15, 2020, 11:55am UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/10 "2020-10-15T11:55:02Z")

</div>

\*\*\* Ensure that the JWT credentials you’re using belong to _your_ account\*\*  
@will.zoom  
Does this mean that on the JWT App, other users cannot join meetings they have created externally even when they have provided the right meeting credentials?

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 16, 2020, 8:31pm UTC](https://devforum.zoom.us/t/web-sdk-cdn-1-7-10-signature-is-invalid/24888/11 "2020-10-16T20:31:12Z")

</div>

Hey @preciousfocus,

No, sorry for any confusion—other users can join a meeting via the Web SDK. However, in order to start the meeting as host via the Web SDK, you must ensure that you the credentials you’re using are associated with your own account.

I hope this helps to clarify!  
-Will
