# Web SDK Can't Join as Host

**URL:** <https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045>\
**Category:** Web\
**Created:** [March 19, 2020, 11:39pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045 "2020-03-19T23:39:36Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![That-Tech-Guy](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@That-Tech-Guy](https://devforum.zoom.us/u/That-Tech-Guy)\
**Post date:** [March 19, 2020, 11:39pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/1 "2020-03-19T23:39:36Z")

</div>

![both.PNG](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/f/f45cb8f4c253cf96b06d654e76667caed643f3b5.jpeg)

This code works when role = 0 but not when role = 1

This is the error we are getting when role = 1, how can we host a meeting with the web SDK?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 20, 2020, 12:07am UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/2 "2020-03-20T00:07:44Z")

</div>

Hey @That-Tech-Guy,

Please provide more details like your code, how you are generating your signature, and steps to reproduce the issue.

Reminder: the Web SDK does not support starting webinars, only meetings.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![That-Tech-Guy](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@That-Tech-Guy](https://devforum.zoom.us/u/That-Tech-Guy)\
**Post date:** [March 20, 2020, 4:53pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/3 "2020-03-20T16:53:32Z")

</div>

Okay, we are certainly having trouble starting a meeting with the websdk. When the documentation says we can start a meeting though, does that mean we start the meeting as a host and have control over other users in the meeting, or does it just mean start as a participant?

Joining meetings as a participant is working, when we set role to 0. But, when we set role to 1, we get the following error:

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/adda7599686bd95ea21889a07b22b14c3e9b3112.png)

We are generating the signature in node.js with the following code:

> exports.generateSignature = function(meetingNumber, role){  
> console.log("generating signature with: ", meetingNumber, role);  
> const timestamp = new Date().getTime();  
> const msg = Buffer.from(apiKey + meetingNumber + timestamp + role).toString(‘base64’);  
> const hash = crypto.createHmac(‘sha256’, apiSecret).update(msg).digest(‘base64’);  
> const signature = Buffer.from(`${apiKey}.${meetingNumber}.${timestamp}.${role}.${hash}`).toString(‘base64’);
> 
> return signature;  
> }

We’ve also tried generating the signature client side with the webSDK itself:

> ZoomMtg.generateSignature({  
> meetingNumber: meetConfig.meetingNumber,  
> apiKey: meetConfig.apiKey,  
> apiSecret: meetConfig.apiSecret,  
> role: meetConfig.role,  
> success: res =\> {

This results in the same error when role is set to 1.  
We’re setting up the websdk in a react.js project like this:

> import { ZoomMtg } from “@zoomus/websdk”;  
> ZoomMtg.setZoomJSLib(“node\_modules/@zoomus/websdk/dist/lib”, “/av”);  
> ZoomMtg.setZoomJSLib(“[https://source.zoom.us/1.7.2/lib](https://source.zoom.us/1.7.2/lib)”, “/av”);  
> ZoomMtg.preLoadWasm();  
> ZoomMtg.prepareJssdk();

Thanks!

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [March 20, 2020, 5:45pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/4 "2020-03-20T17:45:20Z")

</div>

Hi @That-Tech-Guy,

What is the meeting ID that you use when you try to join as a host? Keep in mind if you join as host then the meeting ID needs to be from the host that you use the API Key Secret for.

Thanks  
Michael

---

<div class="post-metadata">

**Author:** ![That-Tech-Guy](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@That-Tech-Guy](https://devforum.zoom.us/u/That-Tech-Guy)\
**Post date:** [March 20, 2020, 6:31pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/5 "2020-03-20T18:31:30Z")

</div>

So, if I’m understanding what you’re saying, if I created a meeting with an Oauth token, I can then use a key from a JWT app to join as a participant but not as the host?

I’m a little confused, because I created an Oauth app, got a user token, used that to create a meeting, then tried to join as a participant and it wasn’t working. So I then created a JWT app, and used that key and secret and was able to join as a participant.

So, is it possible for me to join as a host a meeting I created with a token from an OAuth token app using the WebSDK?

If so, what information should i be using to

- create the meeting via api,
- create the signature to join the meeting
- join the meeting

Thanks!

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [March 20, 2020, 7:02pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/6 "2020-03-20T19:02:09Z")

</div>

Hi @That-Tech-Guy

> [@That-Tech-Guy](#):
>
> if I created a meeting with an Oauth token, I can then use a key from a JWT app to join as a participant but not as the host?

Yes, you can join a meeting that was created using an OAuth token as a WebSDK participant. To join as a WebSDK host, that meeting needs to be under the same account as the JWT API Key Secret since a JWT app is an account wide app.

> [@That-Tech-Guy](#):
>
> So, is it possible for me to join as a host a meeting I created with a token from an OAuth token app using the WebSDK?

Yes, as long as the meeting is under the same account as the created JWT app.

Does this helps? If not, please post the meeting ID that you’re getting the error from and the Account ID.

Thanks

---

<div class="post-metadata">

**Author:** ![That-Tech-Guy](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@That-Tech-Guy](https://devforum.zoom.us/u/That-Tech-Guy)\
**Post date:** [March 20, 2020, 7:28pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/7 "2020-03-20T19:28:50Z")

</div>

Yes this helps very much!

We may have a few more questions as we begin to test, but we’ve successfully joined as a host now.

Thanks!

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 20, 2020, 9:08pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/8 "2020-03-20T21:08:19Z")

</div>

Happy to hear it worked!

Yes, please let us know if you have additional questions!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![riley](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/riley/32/3947_2.png) [@riley](https://devforum.zoom.us/u/riley)\
**Post date:** [March 23, 2020, 12:10am UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/9 "2020-03-23T00:10:26Z")

</div>

> [@michael\_p.zoom](#):
>
> To join as a WebSDK host, that meeting needs to be under the same account as the JWT API Key Secret since a JWT app is an account wide app.

Does this imply that there is no way to make a product with the WebSDK where people create & host meetings under their own Zoom accounts?

It seems like OAuth and the SDK don’t really interact at all. Is the SDK really only meant for ISV partners?

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [March 23, 2020, 12:51am UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/10 "2020-03-23T00:51:42Z")

</div>

Hi @riley,

No, that’s not what I was implying towards.  
The credentials for the WebSDK are located within the JWT App, their’s only one JWT app per account. No matter how many users within that account who log into marketplace and create other app types, they will still see the same JWT app with the same credentials.

For example you have Account A with user 1, user 2, and user 3 who are all under the same account.

1. User 1 creates a JWT app for the account.
2. User 2 creates an Account-level OAuth app, then uses the app to create meetings for himself and User 3.
3. When User 2 configures the WebSDK, he enters the JWT app API Key/Secret credentials and changes the “role” parameter to 1 to start a meeting as a host.
4. User 2 enters in the meeting ID that was created for them by the OAuth app and they’re now the host using the WebSDK.
5. Later that day, User 3 enters in the meeting ID that was created for them by the OAuth app and they can become the host as well using the WebSDK.

So as long as the users are under the same account, they can start a meeting as a host using the WebSDK.

The WebSDK can be used for both licenses and ISV partners as ISV partners are billed based on minutes.

Hope this helps, let us know if you have any other questions.

Thanks  
#codeHappy

---

<div class="post-metadata">

**Author:** ![riley](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/riley/32/3947_2.png) [@riley](https://devforum.zoom.us/u/riley)\
**Post date:** [March 23, 2020, 12:56am UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/11 "2020-03-23T00:56:28Z")

</div>

Thanks a lot for the further explanation!

What about a hypothetical User 4 who is in a DIFFERENT account, Account B.

Is there any way to make a product with the SDK under Account A, and then allow users from Account B to host meetings with that product?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 23, 2020, 5:27pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/12 "2020-03-23T17:27:45Z")

</div>

Hey @riley,

The user from the different account B won’t be able to host meetings, only join them via the Web SDK created by account A.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![riley](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/riley/32/3947_2.png) [@riley](https://devforum.zoom.us/u/riley)\
**Post date:** [March 23, 2020, 7:35pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/13 "2020-03-23T19:35:02Z")

</div>

Ok, thanks. It sounds like it would be impossible to make a website where users from different Zoom accounts use the website to create meetings and then host them from the SDK.

If my understanding is correct, it might make more sense to use the web client than the SDK, since users from different Zoom accounts _can_ host meetings in the web client. Does that sound right? Is using the web client url inside an iframe a supported use case we can depend on?

In other words, is it safe to embed an iframe with url [https://zoom.us/wc/${meeting.id}/join?prefer=1&](https://zoom.us/wc/%24%7Bmeeting.id%7D/join?prefer=1&) or should I expect that url to change or become un-embeddable?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 23, 2020, 10:41pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/14 "2020-03-23T22:41:07Z")

</div>

Hey @riley,

> [@riley](#):
>
> It sounds like it would be impossible to make a website where users from different Zoom accounts use the website to create meetings and then host them from the SDK.

Correct, however the intention of the Web SDK is to join meetings. Any meeting can be joined by a user using the Web SDK, but only meetings owned by the Web SDK can be started.

> [@riley](#):
>
> If my understanding is correct, it might make more sense to use the web client than the SDK, since users from different Zoom accounts _can_ host meetings in the web client. Does that sound right? Is using the web client url inside an iframe a supported use case we can depend on?

For your use case of wanting 3rd party users to host meetings on your site then yes, use an iFrame or have them just click the start URL to host using the Zoom Client.

> [@riley](#):
>
> In other words, is it safe to embed an iframe with url [https://zoom.us/wc/${meeting.id}/join?prefer=1&](https://zoom.us/wc/%24%7Bmeeting.id%7D/join?prefer=1&) or should I expect that url to change or become un-embeddable?

Yes, we have no plans to stop supporting the Zoom Web Client

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![sanjeev.dhawan](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sanjeev.dhawan](https://devforum.zoom.us/u/sanjeev.dhawan)\
**Post date:** [June 17, 2020, 10:08pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/15 "2020-06-17T22:08:40Z")

</div>

Hi @michael_p.zoom,

I have created JWT app and using the same I’ve created a meeting using WebSDK, now I’m trying to join as a HOST but couldn’t succeed, can you please help me out as I’m sending the role as 1 when I want to join a meeting as Host and 0 for attendee.

Thanks,

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 18, 2020, 11:44pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/16 "2020-06-18T23:44:00Z")

</div>

Hey @sanjeev.dhawan,

Please provide the exact error message you are seeing so we can help debug.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:08pm UTC](https://devforum.zoom.us/t/web-sdk-cant-join-as-host/9045/17 "2020-08-21T22:08:38Z")

</div>


