Skip to content

Instantly share code, notes, and snippets.

@geekvijay
Created Oct 4, 2020
Embed
What would you like to do?
const jwt = require("jsonwebtoken");
const ZOOM_SDK_KEY = "";
const ZOOM_SDK_SECRET = "";
const HOUR = 60 * 60;
const iat = Math.floor(Date.now() / 1000) - 60; // ms -> s
const exp = iat + 24 * HOUR;
const token = jwt.sign(
{
appKey: ZOOM_SDK_KEY,
iat: iat,
exp: exp,
tokenExp: exp,
},
ZOOM_SDK_SECRET,
{
header: {
alg: "HS256",
typ: "JWT",
},
}
);
console.log(token);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment