ZoomMtg.join() returns “The signature has expired.” help me please

Yeii now works for me too, thank you so much for help me

1 Like

You are welcome!

Feel free to reach out again if any issues arise!

Thanks!

Hi Tommy,

I am using jsonwebtoken i.e. JWT API type of credentials. I am still getting the above error. Earlier I was thinking that it is because of time which is required to generate the signature causing the problem. As signature creation part is in Java file and we are initiating the meeting using JS / JSP file by calling the Init / Join method using the same signature. We tried to pass the current time so that there is no problem with time but still it is giving me same error. I believe that there might be something missing in terms of any kind of configuration OR it might be possible that the code provided on above URL is works fine for some time, sometimes not, not sure.

I would like to know that What does mean it ‘The Signature has expired’, I mean in which condition it comes ?.

Can you suggest what needs to be done to resolve this issue ?

Thanks,
Manoj Sarode.

Hi Tommy,

I have one question, for the above error, is timezone / timestamp matters for generating the signature?

Let me share you today’s experience with you.

While doing the analysis, we have compared the time present on mine system VS time present on the colleague system where this application is running fine. There was difference of 7 mins. Mine system is 7 mins ahead as compare to the other one.

We did many R&D changes to calculate the signature. Later on we had minuses the 7 mins (converting to millisecond) from the current system time while generating the signature and ran the code. It was started working properly.

Now, considering the above scenario, I have below questions :

1] How we can identify whether the particular signature is valid for certain time ? OR Expiry logic ?
2] Is there any time conversion / Offset is required to generate the signature ?
3] How signature gets validated on zoom server, I mean what kind of parameter consider while checking the signature in order to run the zoom meeeting ?

Kindly waiting for valuable inputs.

Please Note : While doing the testing on same code, we extra error i.e. “3005 - clear attendees”. These was often occurred. For your reference, I have provided you the below image.

Thanks,
Manoj Sarode.

Hey @manoj.sarode,

Can you share the code you use to generate the signature? (don’t include any API creds)

Thanks.

Hi Tommy / Zoom Team,

Please find the below code. As I had said in trail mail, this code we have taken from below URL. The difference is only the time difference calculation :

https://marketplace.zoom.us/docs/sdk/native-sdks/Web-Client-SDK/tutorial/generate-signature -> JAVA tab / section code

**Method which is generating the Signature : **

public String generateSignature(String asApiKey, String asApiSecret, String asMeetingNumber, Integer aIRole)
	{
		try
		{
			Mac hasher = Mac.getInstance("HmacSHA256");
			int liMin	= 10;
			long llOffsetMinMs = (long)liMin*60*1000;
			long llCurrentTimeMs = System.currentTimeMillis();
			llCurrentTimeMs = llCurrentTimeMs - llOffsetMinMs;
			String lsCurrentTimeInMilliseconds = Long.toString(llCurrentTimeMs);

			String lsMsg = String.format("%s%s%s%d", asApiKey, asMeetingNumber, lsCurrentTimeInMilliseconds, aIRole);
			hasher.init(new SecretKeySpec(asApiSecret.getBytes(), "HmacSHA256"));

			String lsMessage = Base64.getEncoder().encodeToString(lsMsg.getBytes());
			byte[] hash = hasher.doFinal(lsMessage.getBytes());
			String lsHashBase64Str = DatatypeConverter.printBase64Binary(hash);
			String lsTmpStr = String.format("%s.%s.%s.%d.%s", asApiKey, asMeetingNumber, lsCurrentTimeInMilliseconds, aIRole, lsHashBase64Str);
			String lsEncodedString = Base64.getEncoder().encodeToString(lsTmpStr.getBytes());

			return lsEncodedString.replaceAll("\\=+$", "");
	  	}
	  	catch (NoSuchAlgorithmException e) {}
	  	catch (InvalidKeyException e) {}
		return "";
	}

Kindly let me know in case of more details require, we are waiting inputs for the concerns asked in last discussion.

Thanks,

Manoj Sarode.

Thanks @manoj.sarode,

To confirm you are no longer getting error: “The signature has expired.” because you are changing the time by 7 minutes.

Now you are getting new error: 3005 clear attendees?

Also I am working on getting your 3 questions answered.
1] How we can identify whether the particular signature is valid for certain time ? OR Expiry logic ?
2] Is there any time conversion / Offset is required to generate the signature ?
3] How signature gets validated on zoom server, I mean what kind of parameter consider while checking the signature in order to run the zoom meeeting ?

Thanks for your patience!

1 Like

Hi Tommy / Team,

We are waiting for your reply… We continuously gets the below error i.e. Error code : 3005 clear attendees?.

Can you plz provide your valuable inputs for the below concerns as well ?

“Also I am working on getting your 3 questions answered.
1] How we can identify whether the particular signature is valid for certain time ? OR Expiry logic ?
2] Is there any time conversion / Offset is required to generate the signature ?
3] How signature gets validated on zoom server, I mean what kind of parameter consider while checking the signature in order to run the zoom meeeting ?”

Thanks,
Manoj Sarode.

Hey @manoj.sarode,

We are working on resolving this.

Thanks for your patience,
Tommy

3005 is another meeting running, https://zoom.github.io/sample-app-web/global.html#errorCodes
you need end another meeting before host a new meeting, one user only host a meeting at the same time
“The signature has expired” the most reason is because you localtime(new) > zoom’s server time(old),
we also think this is invalid signature.

2 Likes

Hi JackYang,

Thank you for updates. Yes I could see the error codes on provided url.

Hi Tommy,

We are still waiting for remaining points. It will be appreciate if you provide these details with example so that it will be more understandable.

Thanks,
Manoj Sarode.

Hey @manoj.sarode,

The signature lasts 24 hours from creation date (in your servers timezone, which is most likely UTC/GMT).

I believe what’s happening is on the Zoom JS SDK, it is comparing the generated signature to your browsers timezone which could be different then UTC / GMT, thus the signature expiring for some users in different timezones.

I am working on getting more details for you and also updating our SDK documentation soon to make this more clear.

Let me know if this helps,
-Tommy

Hi, me again, I just want to know how can I do for the integration be responsive?

Hey @magh92,

We are working on making the Web SDK completely responsive. This will most likely come out sometime in Q1 of next year. You can track our releases here.

You could customize the CSS to make it responsive yourself, but we do not recommend that.

Thanks,
Tommy

1 Like

Is there any news about this issue? this is how im joining a meeting

ZoomMtg.generateSignature({
meetingNumber: meetConfig.meetingNumber,
apiKey: meetConfig.apiKey,
apiSecret: meetConfig.apiSecret,
role: meetConfig.role,
success(res) {
ZoomMtg.init({
leaveUrl: meetConfig.leaveUrl,
success() {
ZoomMtg.join(
{
meetingNumber: meetConfig.meetingNumber,
userName: meetConfig.userName,
signature: res.result,
apiKey: meetConfig.apiKey,
userEmail: this.email,
passWord: meetConfig.passWord,
success() {
//$(’#nav-tool’).hide();
// RunCanvas(this.isTutor === “false” ? “false” : “true”, this.appointment,‘9824f2cc-c1de-4fcd-a8e0-96cf246299c3’,this.person.email,this.person.firstName,this.person.id);
RunCanvas(isTutor === “false” ? “false” : “true”, appointment,‘9824f2cc-c1de-4fcd-a8e0-96cf246299c3’ , person.email, person.firstName,person.id);
},
error(res) {``
// console.log(res);
}
}
);
},
error(res) {
// console.log(res);
}
});
}
});

The signature has expired? first sync your time with Internet time
if still have issue
generate signature by yourself https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/signature

// Prevent time sync issue between client signature generation and zoom 
  const timestamp = new Date().getTime() - 30000

Hey @tommy,

I am using the latest angular web sdk and i am still getting this error when clicking on Join Meeting.

signature passed is :

Can you please help me out with this ?

image

Hey @dharminder,

This could be an issue with your time settings on your computer. Checkout this thread:

Thanks,
Tommy

hey @tommy

I did it on my computer and also tested it in different computers from my friends and different mobiles, but they have the same issue. How can I solve it?

Hey @Mavicontrol,

Please try not to double post. :slight_smile: I have answered you here:

Thanks,
Tommy