Zoom Web Meeting SDK v2.8.0 Invalid Signature

Description
Hi, I’m using Web Meeting SDK v2.8.0 to start & join a meeting.
When the page load, its said invalid signature in network tabs(inspect element).
then I tried to resend the request through the network tabs by double-clicking, and it succeed.
but when I reload the page its said invalid signature again. Please help.

Browser Console Error
Request : /api/v1/wc/info?meetingNumber=77416987132&userName=Hendry&passWord=123Abc%2B&signature=[REDACTED]&lang=en-US&userEmail=&cv=2.8.0&proxy=1&sdkOrigin=aHR0cHM6Ly9hdmEtYmFja29mZmljZS5iY2FmLmNvLmlk&tk=&ztk=&zsk=&ulsm=0&sdkUrl=aHR0cHM6Ly9hdmEtYmFja29mZmljZS5iY2FmLmNvLmlkOi9BZ2VudC9SZXF1ZXN0L0NvbmZpcm0&captcha=&captchaName=&suid=&corsHeader=false&signatureType=sdk&callback=localJsonpCallback1
Response : localJsonpCallback1({“status”:false,“errorCode”:200,“errorMessage”:“Invalid signature.”})

Which Web Meeting SDK version?
2.8.0

Meeting SDK Code Snippets
signature :
{
“appKey”: “[REDACTED]”,
“sdkKey”: “[REDACTED]”,
“mn”: [REDACTED],
“role”: 1,
“iat”: 1665383390,
“exp”: 1665385190,
“tokenExp”: 1665385190
}

Script :
function startJoinHost(){
let sdkKey = “[REDACTED]”;
let signature = “[REDACTED]”;
let meetingNumber = “[REDACTED]”;
let password = “123Abc+”;
let userName = “Hendry”;
let zakToken = document.getElementById(‘zakToken’).value;
ZoomMtg.preLoadWasm();
ZoomMtg.prepareWebSDK();
// loads language files, also passes any error messages to the ui
ZoomMtg.i18n.load(‘en-US’);
ZoomMtg.i18n.reload(‘en-US’);
ZoomMtg.setZoomJSLib(‘https://source.zoom.us/2.8.0/lib’, ‘/av’);

ZoomMtg.init({
	debug: true,
	leaveUrl: baseURL+"/Agent/Request/End",
	showMeetingHeader: false, //option
	disableInvite: true, //optional
	disableCallOut: true, //optional
	disableRecord: false, //optional
	disableJoinAudio: false, //optional
	audioPanelAlwaysOpen: true, //optional
	showPureSharingContent: false, //optional
	isSupportAV: true, //optional,
	isSupportChat: true, //optional,
	isSupportQA: false, //optional,
	isSupportPolling: false, //optional
	isSupportBreakout: false, //optional
	isSupportCC: false, //optional,
	screenShare: true, //optional,
	rwcBackup: '', //optional,
	videoDrag: false, //optional,
	sharingMode: 'fit', //optional,
	videoHeader: false, //optional,
	isLockBottom: false, // optional,
	isSupportNonverbal: false, // optional,
	isShowJoiningErrorDialog: true, // optional,
	disablePreview: true, // optional
	disableCORP: true, // optional
	meetingInfo: [ // optional
	  'topic',
	  'host',
	  'mn',
	  'pwd',
	  'telPwd',
	  'invite',
	  'participant',
	  'dc',
	  'enctype',
	  'report'
	],
	disableVoIP: false, // optional
	disableReport: false, // optional
	success: (success) => {
		console.log(success)

		ZoomMtg.join({
		  sdkKey		: sdkKey,
		  signature		: signature, // role in SDK Signature needs to be 0
		  meetingNumber	: meetingNumber,
		  passWord		: password,
		  userName		: userName,
		  success		: (success) => {
			ZoomMtg.showRecordFunction({
				show: true
			});
			console.log(success)
		  },
		  error: (error) => {
			console.log(error)
		  }
		});
	},
	error: (error) => {
		console.log(error)
	}
});

}

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Create a Meeting using zoom API
  2. Create Signature SDK Apps
  3. Load Zoom Web SDK using CDN
  4. See error

Troubleshooting Routes

  • Checked the signature, compare to zoom documentation
  • try decode with jwt.io
  • Checked error console browser
  • Checked network tabs browser if any resource failed to load
  • Switched zoom account
  • checked cookies and session
  • Use another device
  • Use another browser

Device (please complete the following information):

  • Device: Macbook Pro
  • OS: iOS 12.6 Montrey
  • Browser: Firefox
  • Browser Version 105

Hi all, please I have been struggling with integrating the zoom web sdk into my website lately. below is the description of the error that I am getting:
When I set the time on my device to GMT(i.e London time) I was able to login as an Attendee after a few trials but when I set the time to my local time (i.e GMT +1) I keep getting “Signature is invalid”.
In either case, if the role is set to host I keep getting “Signature is invalid”.
Please I really need this sdk in my app and will be glad to have this fixed.
Thanks to you all.

@sulesanusi1,

Welcome to the Zoom Developer Forum – happy to help. It seems the reason you are getting that issue is because of the timestamp when the token was issued. Double-check that the timestamp is in epoch time and satisfy the rules below :

Resource

Thanks for the response, I still get the “signature is invalid” error when I tried to join meeting as a host, but the error disappears when I try to join as an attendee. Please is there a solution to this?

is your meeting created in the same zoom account like the Meeting SDK App?

Thanks so much, it’s working now, I was using meeting credentials from another account. I really appreciate your response.

Glad to hear you were able to resolve the signature is invalid error @sulesanusi1 ! And thank you for your active participation and contributions to the Zoom Developer Forum, @j.schoenemeyer!

Hi, please can you share with me a sample PHP code for generating SDK App type signature? I have not had any success trying to do that from my end.
Thanks.

1 Like

Thank you for sharing this post on how to generate signatures with PHP @j.schoenemeyer.

@sulesanusi1,

Should you have any additional questions, please let us know – we are always happy to help!

Hi, my project is not a laravel based project, is there no way to generate the signature using php’s built in function like hash_hmac?
Thanks.

@sulesanusi1 ,

For a list of libraries you can leverage to generate the signature using PHP, please visit JWT.io libraries for Token Signing/Verification page:

Thanks man, I have already downloaded the firebase library and it’s working fine. Great community, and lots of love from Nigeria.