Description
When I’m creating a meeting using ZOOM API
with the root user’s userId
meeting is working fine and participants can join the meeting. But when the meeting is created using a member’s userId
, for participants it says meeting not started even though the meeting is started by the host.
Which Web Meeting SDK version?
[1.7.8]
Meeting SDK Code Snippets
This is how I’m creating the meeting in node js.
//Use the zoom ApiKey and zoom APISecret from config.js to generate JWT for authentication
const payload = {
iss: config.ZOOM_APIKey,
exp: new Date().getTime() + 86400,
};
const token = jwt.sign(payload, config.ZOOM_APISecret);
// create instance to connect to zoom API
const zoomInstance = Axios.create({
baseURL: "https://api.zoom.us/v2",
headers: {
"User-Agent": "Zoom-api-Jwt-Request",
"content-type": "application/json",
Authorization: `Bearer ${token}`,
},
JSON,
});
const createMeeting = async (payload = {}) => {
const {
topic,
instituteId,
level = [],
startDateTime,
duration = 120,
} = payload;
const startTime = moment.utc(startDateTime).format();
let meetingObj = {
topic,
type: 2,
start_time: startTime,
duration: duration || 120,
};
if (payload.password) {
meetingObj.password = payload.password;
}
const newMeeting = (
await zoomInstance.post(
`/users/${
payload.userId ? payload.userId : config.ZOOM_ROOT_USER
}/meetings`,
meetingObj
)
).data;
The client-side join-meeting snippet is :
const joinMeeting = async () => {
import("@zoomus/websdk").then(async (zoom) => {
const ZoomMtg = zoom.ZoomMtg;
setNetReq(true);
setZoomMtg(ZoomMtg);
document.getElementById("zmmtg-root").style.display = "block";
ZoomMtg.setZoomJSLib("https://source.zoom.us/2.0.1/lib", "/av");
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
const signature = ZoomMtg.generateSignature({
meetingNumber: data.meetingId, // 2510172637
apiKey: constants.ZOOM_APIKey,
apiSecret: constants.ZOOM_APISecret,
role: "0",
success: function(res) {
console.log(res.result);
},
});
ZoomMtg.init({
leaveUrl: "/video-classes",
isSupportChat: true,
disableInvite: true,
meetingInfo: ["topic"],
success: function() {
console.log("hello");
ZoomMtg.showInviteFunction({ show: false });
ZoomMtg.join({
meetingNumber: data.meetingId, // 2510172637
userName: store.get("user").name,
signature: signature,
apiKey: constants.ZOOM_APIKey,
passWord: data.password,
success() {
ZoomMtg.showPureSharingContent({
show: false,
});
console.log("hello");
},
error(res) {
document.getElementById("zmmtg-root").style.display = "none";
},
});
},
error: function(er) {
console.log("hello", er);
},
});
});
};
Device (please complete the following information):
- Browser: [e.g. Chrome,edge]
If the host is a root user’s userId - participants can join the meeting.
If the host is member’s userId - at participants side, it says meeting not started