Invalid Signature with Sample Web App

Just to post another screenshot about my javascript code (new user is only allowed to post one image per time).

Hey @szliuxi199908, thanks for posting and using Zoom!

Are you using a JWT App Type for the API key and secret?

Thanks,
Tommy

Hi!
I am also experiencing this issue. Created a JWT App with key. Now what am I suppose to do with WebSDK? As of now I was generating signature and then passing it into init phase.
I can’t find any related (valid) documentation of steps necessary to join webinar with JWT access token.
Went through API docs, but can’t find related endpoint to which I should send my webinar ID and other params to obtain signature necessary for joining.
Thanks for help!

Hey @mchrenko,

For joining a webinar with the Web SDK, make sure to set the email in the init function:

// Email required for Webinars
userEmail: meetConfig.userEmail, 

Docs here:
https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/start-join-meeting

Please share screenshots, error messages, and the webinarID if you have additional issues.

Thanks,
Tommy

Hi!
Thanks for quick reply. I do know all the other params necessary for joining webinars. I did use API keys for development, but once deployed on production stack, I am having an issue with webinar joining bcs of the signature. So my question is - how to generate signature when using JWT?

My join code looks like this

ZoomMtg.join({
        meetingNumber: meetingNumber,
        userName: userName,
        userEmail: userEmail,
        signature: ???signature???, // how to calculate it when using JWT?
        apiKey: ZOOM_API_KEY,
        passWord: webinarPassword,

Thanks for any kind of help.

Hey @mchrenko,

Have you seen our docs on how to create a signature:

https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/signature

Thanks,
Tommy

Yes, we were generating signature but the generated token is not working when passed into join method. It returns errorCode 1 - join failed.
When generating locally (using ZoomMtg.generateSignature) - joining works fine.
I am struggling getting to know differences between SDK API keys vs JWT.
Anyhow currently we have sample code for generating signature at our API and when trying to join webinar, we are failing with generic error (but the only thing that changes is signature, so I assume the reason behind this issue lies somewhere near).
Can you please be more specific when we must use JWT (and how to use it) and when we can use generating signature from sample code?

Hey @mchrenko,

Yes it does sound like an issue generating the signature.

To use the Web SDK, you need to use a JWT App Type Key and Secret to generate the signature to authenticate.

To call the Zoom APIs, you can use the JWT Token.

Can you share the code you are using to generate the signature so I can help debug? Also make sure to use a real meeting ID.

Thanks,
Tommy

Thanks for replies. But I think we do not understand completely.

My working solution:

  • generating signature on the front-end (like in the sample app), using WebSDK method ZoomMtg.generateSignature()

Since for generating signature you need ZOOM API KEY SECRET, we ported this very generate signature to our API.

My production not-so-working solution:

  • have our custom API zoom/signature that returns signature based on your sample code.
  • once using this signature, I can’t join the webinar with generic error message

We use real meeting ID (9 digits, no dashes)
As we were debugging this - WebSDK generateSignature returns slightly different signatures than your Node.js sample code. We put there the same timestamp, same meeting ID, same email and username with different signature results.

Hey @mchrenko,

Please private message me the meetingID you are trying to join, as well as the signature you have generated that is throwing the error.

Thanks,
Tommy

Thank you Tommy for helping me out!

1 Like

You are welcome @mchrenko! :slight_smile:

For others reference, they were not correctly generating their signature.

Thanks,
Tommy

1 Like

We are also getting the same error. Created jwt token, APi key and secret key. generated the signature but still getting same error “Invalid Signature”. Meeting number is “162168453”

Hey @subodh.kedarm thanks for posting and using Zoom!

Can you please share your signature with me so I can debug?

Also, please checkout our sample signature code, and sample app.

Thanks,
Tommy

Hi Tommy,

Thanks for your reply. It has been fixed now.

I am facing the below error now fro VIDEO chat. Audio chat is working for me but with noise in the background.

“Cannot detect your camera, please check the device and connection and try again.”

Same browser, same settings of the camera works fine for zoom.us but not for local, giving above error. I have allowed camera access in the browser from site settings privacy policy.

It would be nice if you guide me on this.

Best regards,

Hey @subodh.kedar, happy to help! :slight_smile:

I think the issue is your site needs to use https. Are you using https?

Thanks,
Tommy

Hi Everyone,

Hope this helps someone the example code provided is missing json content headers which results in an empy body on the backend, thus resulting in a bad signature:

Wrong eg:

getSignature(meetConfig) {
fetch(${YOUR_SIGNATURE_ENDPOINT}, {
method: ‘POST’,
body: JSON.stringify({ meetingData: meetConfig })
})

Correct Code:

getSignature(meetConfig) {
	fetch(`${YOUR_SIGNATURE_ENDPOINT}`, {
			method: 'POST',
 headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json'
        },
			body: JSON.stringify({ meetingData: meetConfig })
		})
...

Regards
Fabrice

Thanks, it worked.

But mozilla and safari has issue with SDK. It does not show the option to connect with computer audio. Instead it provides connect using phone. Please let us know if we can have it using computer audio as well.

All works fine for chrome.

Hey @subodh.kedar, that is known functionality.

Please see our browser support here:

https://marketplace.zoom.us/docs/sdk/native-sdks/web#browser-support

Thanks,
Tommy

Hi Tommy,

I am getting the folowing error:

Joining meeting timeout.
password wrong

I simply did ‘host the meeting’ with video on, and copied the meeting id from the generated link.
I havent set any password while setting up the meeting.

Please help.