Joining Meeting Timeout or Browser restriction ,Invalid parameter

What i am doing wrong here? i have been on this joining script for 3 days i cant figure out.

Zoom Meeting SDK Sample JavaScript
<main>
  <h1>Zoom Meeting SDK Sample JavaScript</h1>

  <!-- For Component View -->
  <div id="meetingSDKElement">
    <!-- Zoom Meeting SDK Rendered Here -->
  </div>

  <button onClick="getSignature()">Join Meeting</button>
</main>

<!-- Dependencies for client view and component view -->
<script src="https://source.zoom.us/3.1.6/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/3.1.6/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/3.1.6/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/3.1.6/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/3.1.6/lib/vendor/lodash.min.js"></script>

<!-- For Client View -->
<script src="https://source.zoom.us/zoom-meeting-3.1.6.min.js"></script>
<script src="jsrsasign-all-min.js"></script>
<script type="text/javascript">

ZoomMtg.preLoadWasm()
ZoomMtg.prepareWebSDK()
ZoomMtg.i18n.load(‘en-US’);
ZoomMtg.i18n.reload(‘en-US’);

var authEndpoint = ‘’
var sdkKey = ‘<?=$apiKey?>’
var meetingNumber = ‘<?=$meetingNumber?>’
var passWord = ‘<?=$password?>’
var role = 1
var userName = ‘JavaScript’
var userEmail = ‘murungatim@gmail.com’
var registrantToken = ‘’
var zakToken = ‘<?=$zak?>’
var leaveUrl = ‘?’

function getSignature() {
startMeeting(generateSignature(‘<?=$apiKey?>’,‘<?=$apiSecret?>’,‘<?=$meetingNumber?>’,1));
}

function generateSignature(apiKey, apiSecret, meetingNumber, role) {
const header = { alg: ‘HS256’, typ: ‘JWT’ };
const iat = Math.floor(Date.now() / 1000) - 30;
const exp = iat + 60;
const payload = {
iss: apiKey,
exp: exp,
iat: iat,
meetingNumber: meetingNumber,
role: role
};

  const jwt = KJUR.jws.JWS.sign('HS256', JSON.stringify(header), JSON.stringify(payload), apiSecret);
  return jwt;
}

function startMeeting(signature) {
alert(signature);
document.getElementById(‘zmmtg-root’).style.display = ‘block’

ZoomMtg.init({
leaveUrl: leaveUrl,
patchJsMedia: true,
success: (success) => {
console.log(success)
ZoomMtg.join({
signature: signature,
sdkKey: sdkKey,
meetingNumber: meetingNumber,
passWord: passWord,
userName: userName,
userEmail: userEmail,
tk: registrantToken,
zak: zakToken,
success: (success) => {
console.log(success)
},
error: (error) => {
console.log(error)
},
})
},
error: (error) => {
console.log(error)
}
})
}

<!-- For Component View -->
<!-- <script src="https://source.zoom.us/3.1.6/zoom-meeting-embedded-3.1.6.min.js"></script>
<script type="text/javascript" src="component-view.js"></script> -->
![image|690x440](upload://zUq6nbgrTHZan97wK7t7Ipul0mf.png)

@chunsiong.zoom Kindly assist me on this.

@murungatim can you post a sample of the generated JWT token?

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIiLCJleHAiOjE3MTMzMjY4MjIsImlhdCI6MTcxMzMyNjc2MiwibWVldGluZ051bWJlciI6IiIsInJvbGUiOjF9.aFIn5MzYxDfPG293ao9bLU0ZY71STfSzQ817mBIVFqw

@murungatim this JWT is not properly formed.

It is missing the appKey and tokenExp

The exp needs to be minimally 30 mins from the IAT

Using this iam getting with jsrsasign

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiIiLCJhcHBLZXkiOiIiLCJtbiI6IiIsInJvbGUiOjEsImlhdCI6MTcxMzMzMDI0NCwiZXhwIjoxNzEzMzM3NDQ0LCJ0b2tlbkV4cCI6MTcxMzMzNzQ0NH0.cxKQJgDCDvtqxqUoEDUDo0rhG3spM1b-Fu_wMu8C9Vk

and the same error of invalid params

@murungatim your appKey / sdkKey are empty. You need to put in your clientID as your appKey / sdkKey

True , wasn’t fetching from dB.

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJHOFNkZXA5YVM0bVV4d1J5RFhmTm9BIiwiZXhwIjoxNzEzMzMwOTgyLCJpYXQiOjE3MTMzMzA5MjIsIm1lZXRpbmdOdW1iZXIiOiI3MTgxOTc0NzkwMCIsInJvbGUiOjF9.5mIK8RWHiPnyQ0hlnSg_FflrvdXVKlYbL2AMJCTwJOc

error

Joining Meeting Timeout or Browser restriction

Fail to join the meeting.

@murungatim ,

Now the appKey and sdkKey are missing from the key value pair.
IAT and Expiry timeframe is also too close to each other, it needs to be 30 mins apart minimally

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJHOFNkZXA5YVM0bVV4d1J5RFhmTm9BIiwiYXBwS2V5IjoiRzhTZGVwOWFTNG1VeHdSeURYZk5vQSIsIm1uIjoiNzE4MTk3NDc5MDAiLCJyb2xlIjoxLCJpYXQiOjE3MTMzMzE0MDQsImV4cCI6MTcxMzMzODYwNCwidG9rZW5FeHAiOjE3MTMzMzg2MDR9.3AyiU3YktQRMQvh1-uQ3hLeIt2YR6H5zF8-dJFPeFGg

now the error is about token

@murungatim what error are you getting now?

For starters, try to change the role to 0 and make sure you join a meeting which is internal / the same as the SDK account

i think i am mixing up this thing , i am suing this to join

ZoomMtg.init({
  leaveUrl: leaveUrl, // https://example.com/thanks-for-joining
  success: (success) => {
    ZoomMtg.join({
      sdkKey: sdkKey,
      signature: signature, // role in SDK signature needs to be 1
      meetingNumber: meetingNumber,
      passWord: passWord,
      userName: userName,
      zak: zakToken, // the host's ZAK token
      success: (success) => {
        console.log(success)
      },
      error: (error) => {
        console.log(error)
      }
    })
  },
  error: (error) => {
    console.log(error)
  }
})

is it ok? my zak is eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJhdWQiOiJjbGllbnRzbSIsInVpZCI6InBxekxyc1R3Uml5SzJleG40UjBzV3ciLCJpc3MiOiJ3ZWIiLCJzayI6IjQ1MDExOTA2NDE5MjU2NTQ5NzIiLCJzdHkiOjEwMCwid2NkIjoidXMwNCIsImNsdCI6MCwibW51bSI6IjcxODE5NzQ3OTAwIiwiZXhwIjoxNzEzMTkzNzEwLCJpYXQiOjE3MTMxODY1MTAsImFpZCI6Ik5MaS1XYlhPUUpXb2Z6OS1oSWpsOXciLCJjaWQiOiIifQ.5sFn_bZHMNK6H8q0ayTgyLPn32UE0RtQ7nV8q53oJfA which was created when i created the meeting
Screenshot 2024-04-17 at 09-14-18 Zoom Meeting SDK Sample JavaScript

@murungatim could you try without ZAK token, and try to join a meeting with role : 0 ?

without zak JWT
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJHOFNkZXA5YVM0bVV4d1J5RFhmTm9BIiwiYXBwS2V5IjoiRzhTZGVwOWFTNG1VeHdSeURYZk5vQSIsIm1uIjoiNzE4MTk3NDc5MDAiLCJyb2xlIjoxLCJpYXQiOjE3MTMzMzU2NjcsImV4cCI6MTcxMzM0Mjg2NywidG9rZW5FeHAiOjE3MTMzNDI4Njd9.GmOUSVmd7Zm6YkKrG-nVQs-s3WuNQJV7E1kx1efkEsk

error Signature is invalid.

@murungatim I’ll PM you for additional details

1 Like