I have created Video SDK account by using this link.
The code which I use for signature generation:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsrsasign/8.0.20/jsrsasign-all-min.js"></script>
function generateVideoToken(sdkKey, sdkSecret, topic, password = "") {
let signature = "";
// try {
const iat = Math.round(new Date().getTime() / 1000);
const exp = iat + 60 * 60 * 2;
// Header
const oHeader = { alg: "HS256", typ: "JWT" };
// Payload
const oPayload = {
app_key: sdkKey,
iat,
exp,
tpc: topic,
pwd: password,
};
// Sign JWT
const sHeader = JSON.stringify(oHeader);
const sPayload = JSON.stringify(oPayload);
signature = KJUR.jws.JWS.sign("HS256", sHeader, sPayload, sdkSecret);
return signature;
}
Also, I have tried to generate signature by using Heroku app.
But all the time I receive the following error: This account does not exist or does not belong to you