Unable to Join Zoom meeting through ZoomMtg.join() , Getting Signature is expired

Description
I’m using Server-to-server app to embed zoom in our application. I’m able to call Rest API’s with access_token generated with /authorize API call, But unable to join zoom with meeting SDK.

I tried using generateSDKSignature like the following to generate signature:

ZoomMtg.generateSDKSignature({
	meetingNumber: meetingNumber,
        sdkKey: clientId,
	sdkSecret: clientSecret,
	role: 0,
	success: function (res) {
		generatedSignature = res.result;
	}
});

Using the generatedSignature to join the meeting as following :

zoomIframeWindow.ZoomMtg.init({
		                leaveUrl: zoomIframeWindow.location.href,
		                success: function () {
		                    unloadWindowListener(false);
		                    zoomIframeWindow.ZoomMtg.i18n.load(meetingConfig.lang);
		                    zoomIframeWindow.ZoomMtg.i18n.reload(meetingConfig.lang);
		                    zoomIframeWindow.ZoomMtg.join({
		                        meetingNumber: meetingConfig.meetingNumber,
		                        userName: meetingConfig.userName,
					userEmail: meetingConfig.userEmail,
					passWord: meetingConfig.passWord,
			                signature: meetingConfig.signature,
					sdkKey: meetingConfig.clientId,
		                        success: function (res) {
		                               console.log("joined successfully");
		                        },
				        error: function (res) {
						console.log("joining meeting failed");
				         }
		                    });
		                },
		                error: function (res) {
		                    console.log(res);
		                },
	                });

Browser Console Error
“Signature is Expired”

Which Web Meeting SDK version?
Meeting SDK version : 2.11.0

Meeting SDK Code Snippets
Provided above

Troubleshooting Routes
I have tried populating the signature in java as well, Getting same error

private String createJWTToken(String zoomClientId, String zoomClientSecret, String meetingNumber, String role) throws InvalidKeyException, NoSuchAlgorithmException, JSONException {
		//Header
		JSONObject header = new JSONObject();
		header.put("alg", "HS256");
		header.put("typ", "JWT");

		//payload
		ZonedDateTime currentTime = ZonedDateTime.now(ZoneOffset.UTC).minusSeconds(30);
		JSONObject payload = new JSONObject();
		payload.put("sdkKey", zoomClientId);
		payload.put("mn", meetingNumber);
		payload.put("role", role);
		payload.put("iat", currentTime.toInstant().toEpochMilli());
		payload.put("exp", currentTime.plusDays(1).toInstant().toEpochMilli());
		payload.put("tokenExp", currentTime.plusDays(1).toInstant().toEpochMilli());

		String encodedHeader = Base64.getUrlEncoder().withoutPadding()
				.encodeToString(header.toString().getBytes(StandardCharsets.UTF_8));
		String encodedPayload = Base64.getUrlEncoder().withoutPadding()
				.encodeToString(payload.toString().getBytes(StandardCharsets.UTF_8));
		String signature = hmacSha256(encodedHeader + "." + encodedPayload, zoomClientSecret);
		return encodedHeader + "." + encodedPayload + "." + signature;
	}

Device (please complete the following information):

  • Device: Macbook Pro
  • OS: 12.5.1
  • Browser: Chrome and Safari

@donte.zoom Need ur expertise here, Thanks in advance

@khoros-webinar-2 ,

Please see this developer forum post and let me know if this helps. :

Thanks @donte.zoom for your reply, I’m clear that Meeting SDK can only be authenticated with SDK app type.

I do need to use APIs in my application as well, is there any other way to authenticate API’s other than Oauth?

Hi, @khoros-webinar-2,

Thank you for your question. At this time, there are two ways to authenticate Zoom Rest APIs:

  • Integrations (OAuth apps)
  • Internal apps ( Server-to-Server OAuth app)

Here is our support documentation for reference :

Internal apps (Server-to-server)

https://developers.zoom.us/docs/internal-apps/

Integrations (OAuth apps)

https://developers.zoom.us/docs/integrations/

1 Like

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