Joining meeting with Meeting SDK (JWT created with Client ID and Secret) - 'JOIN_MEETING_FAILED'

I’m trying to join a meeting using Meeting Web SDK.

What I’m actually doing:

I’m creating a JS class ZoomClient:

const zoomClient = new ZoomClient({
    mode: 'recv-streams',
    username: 'sample',
    email: 'sample@sample.eu',
    meetingUri: zoomUri,
    sdkKey: clientId, // Zoom's General App Client ID
    sdkSecret: clientSecret, // Zoom's General App Client Secret 
   htmlElementId: 'zoom-root',
);

and as you can see I’m passing it my Zoom’s General App Client ID and Secret:

(since February 11, 2023 Client ID and Secret are used instead of SDK Key and SDK Secret)

After that I’m generating a JWT signature using this Client ID and Secret:

const signature = signZoomJoin(meetingNumber, 0, sdkKey, sdkSecret);

export function signZoomJoin(meetingNumber: string, role: 0 | 1, sdkKey: string, sdkSecret: string): string {
  const iat = Math.round(Date.now() / 1000);
  const exp = iat + 60 * 60 * 2;

  const oHeader = { alg: 'HS256', typ: 'JWT' };
  const oPayload = {
    sdkKey: sdkKey,
    appKey: sdkKey,
    mn: meetingNumber,
    role: role,
    iat: iat,
    exp: exp,
    tokenExp: iat + 60 * 60 * 2,
  };

  const sHeader = JSON.stringify(oHeader);
  const sPayload = JSON.stringify(oPayload);
  return KJUR.jws.JWS.sign('HS256', sHeader, sPayload, sdkSecret);
}

(code literally copy pasted from this official GitHub example)

After that I’m creating a zoomClient:

this.client = ZoomMtgEmbedded.createClient();

And then I’m trying to join a Zoom Meeting using that generated JWT signature:

await this.client.join({
    signature, // previously generated signature
    meetingNumber: meetingNumber,
    userName: username,
    sdkKey,
    password: password,
});

This join meeting part breaks and returns an error message 200 ‘Fail to join meeting.’:

image

I followed exact steps on how to do this, and it’s failing.
What am I doing wrong?
Please help

Hi @PhasedConnect_dev , have you searched this forum? There are many threads on this error that can help :slight_smile:

Hi @gianni.zoom!
Yes, I’ve searched this forum for this error and went through many threads and tried different “fixes” but none seem to fix my issue.
The same 200 JOIN_MEETING_FAILED error keeps occurring with a not so descriptive message ‘Fail to join the meeting.’
If only the error message was more descriptive :frowning:

What if you replace the ZoomClient user data with the data of the account under which the Zoom App is created? I think it’s only email in this case

Just replaced it with correct email address.

Didn’t fix the issue. Still getting the same error:
image

One thing though, the JWT signature that it’s generated every time is not valid according to jwt.io:

Here it is:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJEb2dfQXdla1NTaVZ5ZHVUZ29aUGciLCJhcHBLZXkiOiJEb2dfQXdla1NTaVZ5ZHVUZ29aUGciLCJtbiI6Ijg0ODM5NTUwODcyIiwicm9sZSI6MCwiaWF0IjoxNzI0NzQwNjI5LCJleHAiOjE3MjQ3NDc4MjksInRva2VuRXhwIjoxNzI0NzQ3ODI5fQ.4IlpfwW85anJxiAPuyPcgDERhLVWTJy7t_g9zWWMstc

Client ID is Dog_AwekSSiVyduTgoZPg and Client Secret is cgZkest9XEH3pe9R4ffl9YSr47BB3MsA
(I don’t mind them being posted here since it’s just for testing development purposes at the moment)

Regarding email in join method, it is optional. More details in zoom web api.
I once had a problem connecting to a meeting because I didn’t understand what external and internal meeting meant. As a result, if the app is not published the meetings will be internal. And the zoom account from which the conference is created should be the same as the account from which the zoom app is created (or added to it via “User Management”).

Are you 100% of this? @gianni.zoom can you confirm too?
I haven’t read this literally anywhere, that’s why I’m sceptical :sweat_smile:

Btw, just for more context. I’m using Zoom General App:


With Meeting SDK selected in Embed tab:

I haven’t downloaded the Web SDK, I’m just using @zoomus/websdk/embedded npm package in my react project (i updated the package to latest version).

This was the solution! I needed to use the same account to create the meeting and join the meeting.

  • For meeting creation I used Server-to-Server App and Zoom API
  • For joining the meeting I used General App’s Meeting SDK

@gianni.zoom @dmitryukhanov
Unrelated to this post, do you know if I can use the same Zoom account (same Meeting SDK credentials) to join multiple Zoom meetings at once?

If “use the same account to join the meeting” actually means “use zoom app credentials to join the meetings through my app”, then yes, this way users from your app can join different meetings. In my case, for example, this is how teachers run online classes for different groups

1 Like

If I understood correctly, that means this:

I can open multiple browser instances and connect to multiple different Zoom meetings at once (in parallel) with exactly the same credentials (same Client ID and Client Secret)

await this.client.join({
    signature, // generated from the same Client ID and Client Secret
    meetingNumber: meetingNumber, //different meeting number
    userName: username, // same username
    sdkKey, // same Client Secret
    password: password, // different meeting password
});

Is that correct?

Can confirm that is not working @dmitryukhanov .
I’m getting this error:

Error: {
  "type": "JOIN_MEETING_FAILED",
  "reason": "Already has other meetings in progress.",
  "errorCode": 3000
}

And I am using role 0 when creating a JWT, so that ain’t the issue

Try searching the forum first if you encounter a new error.
For example, Web SDK showing 'Already has other meetings in progress' error

1 Like

Awesome dialogue here and happy @PhasedConnect_dev was able to resolve the original issue. Thank you @dmitryukhanov for your contribution to the developer community. It’s much appreciated.

1 Like