Invalid signature 1.8.0

Description
I’ve generated the signature via the php code in the documentation. This php generated code is accessed by the front end of the site via a webhook. On load I import the zoom websdk into my app & then run the following:

			ZoomMtg.preLoadWasm();
			ZoomMtg.prepareJssdk();

			ZoomMtg.init({
				leaveUrl: 'https://local.local/example-page/',
				isSupportAV: true,
				success: (success) => {
					console.log(success)

					ZoomMtg.join({
						signature: data.signature,
						meetingNumber:,
						userName: 'dave1',
						apiKey: 'TheAPIKey',
						passWord : 'MEETINGPASS',
						success: (success) => {
							console.log(success)
						},
						error: (error) => {
							console.log(error)
						}
					})

				},
				error: (error) => {
					console.log(error)
				}
			})

Error
The error returned to me is:

  1. errorCode: 3712
  2. errorMessage: “Signature is invalid.”
  3. method: “join”
  4. result: “Invalid signature.”
  5. status: false

Which version?
1.8.0

Hey @zulu,

Can you please share your Web SDK signature to developersupport@zoom.us for a test meeting so I can help debug? :slight_smile:

Thanks,
Tommy

[signature redacted]

Hey @zulu,

Thanks for providing that!

In checking your role, timestamp, and meeting ID—those all look okay at first glance. Can you confirm that you’re using a JWT App Type for the API key and secret ?

Additionally, how are you generating your timestamp?

Let me know when you have a chance!
-Will

Yep, the credentials used are JWT.

Here’s my signature generation function (in php), pulled from the docs.

public 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), '+/', '-_'), '=');
}

same problem on angular 9

signature

Hey @zulu,

As a next step, can you also ensure that your system’s time settings are also synced properly according to this post:

This can cause issues occasionally as well.

Thanks,
Will

Hey @creativepanda9102,

Are you trying to start this meeting or join this meeting? Have you also confirmed that you’re the owner of the account/app that the JWT key is associated with?

Thanks,
Will

Hi Will,

This setting is the same on my MAC as the post, I’ve also forced it to generate the time in UTC format, which it is returning correctly. Still getting the same invalid signature error.

Hey @zulu,

Apologies for not catching this earlier, but I noticed in your original post you referenced “method: join” —to clarify, you’re currently passing in role 1 to your signature (for starting/host). If you’re using this signature for joining, can you ensure you’re passing role 0 in your signature?

Thanks,
Will

When generating the signature I am currently passing 0.

$signature = $this->generate_signature( $key, $secret, $meeting_id, 0 );

Hey @zulu,

Thank you for that.

To confirm—do you have at least a Pro Zoom Account? This is required to use the SDK, which could be the reason you are seeing that error. If you do not have a Pro account, upgrading should resolve this issue.

Let me know—thanks!
Will

Hey Wil,

Just to update this thread, the issue is now resolved. I was unaware that you needed a pro zoom account in order to use the sdk.

James.

1 Like

Hey @zulu,

Happy to hear you got the issue sorted out! :slight_smile:

Thanks,
Tommy

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.