Trying to create minimal test page, getting Joining meeting timeout. The signature has expired

Description
I am trying to create a minimal testing page of the web sdk for testing purposes. Using an SDK key/secret.

Browser Console Error
I am receiving the error “Joining meeting timeout.
The signature has expired.”

Which Web Meeting SDK version?
Version 2.8.0

Meeting SDK Code Snippets
The code snippets that are causing the error / issue so we can reproduce.

My Minimal test page HTML is (which could be pasted into an html file


	Zoom Meeting TEST
    
    
    


    
    
<script src="https://source.zoom.us/2.8.0/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/2.8.0/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/2.8.0/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/2.8.0/lib/vendor/lodash.min.js"></script>
<!-- import ZoomMtg -->
<script src="https://source.zoom.us/zoom-meeting-2.8.0.min.js"></script>
<script>
//import { ZoomMtg } from '@zoomus/websdk'
// For CDN version default
function websdkready() {
	ZoomMtg.setZoomJSLib("https://source.zoom.us/2.8.0/lib", "/av"); 
	ZoomMtg.preLoadWasm();
	ZoomMtg.prepareWebSDK();
	ZoomMtg.i18n.setSupportLanguage(['en-US']); 
	ZoomMtg.i18n.load('en-US'); 
	const zoomMeeting = document.getElementById("zmmtg-root");
	ZoomMtg.init({
		leaveUrl: '{{ zoomleaveurl|escapejs }}',
		isSupportAV: false,
		// on success, call the join method
		success: function() {
			ZoomMtg.join({
			  meetingNumber: '',
			  userName: 'test@example.org',
			  signature: '',
			  sdkKey: '',
			  userEmail: 'test@example.org',
			  passWord: '',
			  success: (success) => {
				console.log(success)
			  },
			  error: (error) => {
				console.log(error)
			  }
			});
		},
	});
}
window.addEventListener('DOMContentLoaded', function(event) {
  console.log('DOM fully loaded and parsed');
  websdkready();
});
</script>
**I created the signature using jwt.io using the following** Header: "alg": "HS256", "typ": "JWT" } Payload: { "appKey": "", "sdkKey": "", "mn": "", "role": 0, "iat": 1667592404, "exp": 1667592404, "tokenExp": 1667678446 } (and using my SDK secret which I won't post here, I checked and I am using the correct SDK secret and I am not checking "base 64 encoded")

Screenshots
If applicable, add screenshots to help explain your problem.

Troubleshooting Routes
The troubleshooting attempt types you’ve already exhausted, including testing with the appropriate sample app (found on Zoom · GitHub).

Device (please complete the following information):
Latest Chrome/Windows 10/Local html file

your “exp” is wrong, should be

  const iat = Math.round((new Date().getTime() - 30000) / 1000)
  const exp = iat + 60 * 60 * 2
   ...
    tokenExp: iat + 60 * 60 * 2
  }

The comment above is correct - I was incorrectly sending the same iat and exp, when it is tokenExp and exp that should be the same, NOT iat and exp.
So this would be a corrected one then (when sent at the right time - by the time you are reading this the timestamps are too old):
{ “appKey”: “YOUR SDK KEY”, “sdkKey”: “YOUR SDK KEY”, “mn”: “ZOOM MEETING ID”, “role”: 0, “iat”: 1667592404, “exp”: 1667678446 , “tokenExp”: 1667678446 }

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