Meeting SDK version : 2.10.1;
os:windows;
Client view
Whle I am integrating zoom Sdk to my nodejs project I face Issue in joining meeting I get stuck to a joining meeting page
const express=require(“express”);
const app=express();
const bodyParser = require(‘body-parser’);
const mysql = require(‘mysql’);
const dotenv = require(‘dotenv’);
const jwt = require(‘jsonwebtoken’);
const session = require(‘express-session’);
const path = require(‘path’);
const { exit } = require(“process”);
const { v4: uuidv4 } = require(‘uuid’);
const http = require(“http”);
const { url } = require(“inspector”);
const passport = require(‘passport’);
const LocalStrategy = require(‘passport-local’).Strategy;
dotenv.config();
const bcrypt = require(‘bcrypt’);
const multer = require(‘multer’);
const jsrsasign = require(‘jsrsasign’);
const cors = require(‘cors’);
const corsOptions = {
origin: ‘http://localhost:3000’,
app.use(cors(corsOptions));
app.use(express.static(path.join(__dirname, ‘public’)));
app.set(‘view engine’, ‘ejs’);
app.use(bodyParser.urlencoded({ extended: false }));
/* mysql connection */
var con = mysql.createConnection({
host: “localhost”,
user: “root”,
password: “password”,
database:“zoomschema”
});
con.connect(function(err) {
if (err) throw err;
console.log(“Connected!”);
});
// function generateAccessToken(username) {
// const zoomApiSecret = ‘redacted’;
// const token = jwt.sign({ name: username }, zoomApiSecret, { expiresIn: ‘1h’ });
// return token;
// }
function generateAccessToken(username) {
const zoomApiSecret = ‘’; // Replace this with your Zoom API Secret
const zoomApiKey = ‘’; // Replace this with your Zoom API Key
// Payload for the JWT token
const payload = {
iss: zoomApiKey, // Zoom API Key as issuer
exp: Math.floor(Date.now() / 1000) + 3600, // Token expires in 1 hour (3600 seconds)
name: username,
};
// Generate the JWT token
const token = jwt.sign(payload, zoomApiSecret);
return token;
}
// function generateAccessToken(username) {
// const zoomApiSecret = ‘redacted’; // Replace this with your Zoom API Secret
// const zoomApiKey = ‘redacted’; // Replace this with your Zoom API Key
// // Payload for the JWT token
// const payload = {
// iss: zoomApiKey, // Zoom API Key as issuer
// exp: Math.floor(Date.now() / 1000) + 3600, // Token expires in 1 hour (3600 seconds)
// name: username,
// };
// // Generate the JWT token
// const token = jwt.sign(payload, zoomApiSecret);
// return token;
// }
// const loginRoutes = require(‘./routes/login.js’)(con);
app.get(‘/’, (req, res) => {
const username = ‘Rishabh Verma’; // Replace with the logged-in user’s name
const meetingNumber = ‘77619890477’; // Replace with the meeting number to join
const userEmail= ‘redacted@gmail.com’;
// const meetingPassword = ‘fkYw3k’; // Replace with the meeting password if applicable
const passWord= ‘vb4Yzv’;
// Generate a JWT token for the user without specifying the meeting ID
const zoomApiKey = ‘’;
const accessToken = generateAccessToken(username);
// Pass the Zoom meeting URL and token as parameters to the dashboard view
const zoomMeetingUrl = ’ ';
res.render(‘test’, { zoomMeetingUrl,accessToken,userEmail,username,passWord,meetingNumber,zoomApiKey});
});
app.set(‘views’, path.join(__dirname, ‘views’));
app.listen(3000,function(req,res){
console.log(“server connected to port 3000”);
})
This is my app.js code and now code for my ejs file
Please provide me solution to cope with this.