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?
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?
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
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:
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ā, ā/avā);
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
Thanks!
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
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
Thanks!
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.
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
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!
Happy to hear it worked!
Yes, please let us know if you have additional questions!
Thanks,
Tommy
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?
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.
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
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?
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
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& or should I expect that url to change or become un-embeddable?
Hey @riley,
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.
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.
Yes, we have no plans to stop supporting the Zoom Web Client
Thanks,
Tommy
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,
Hey @sanjeev.dhawan,
Please provide the exact error message you are seeing so we can help debug.
Thanks,
Tommy