Description
Everything was working all good till last Friday and today suddenly started getting an error “UIKit: [Object Object]” error when user is joining the video call from web. Error is in all browsers Chrome/Safari/Mozilla
in the zoom code inside of videosdk-ui-toolkit.js inthe area: initializeVideoSdk() {
var e = this;
return lo(function*() {
try {
yield e.joinSession()
} catch (i) {
e.error.throwError(“UIKit”, i),
e.isLoading = !1
}
})(){
“type”: “JOIN_MEETING_FAILED”,
“reason”: “This account does not exist or does not belong to you”,
“errorCode”: 200
}
Could you send a screenshot of the error you’re seeing? Trying to get more context to understand what’s causing it. Also, is the error occurring when a new user tries to join the call, or when the host attempts to initiate and join the session?
Are you using your Video SDK credentials that you got from marketplace.zoom.us to generate your JWT? If so, do you see any errors when debugging the JWT at jwt.io?
From the sample web demo i hijacked the JS files because the @zoom\videosdk-ui-toolkit seems like i need to use node to build a bundle? I “think” i created the right SDK key but its not clear if i did.
OK yes the first step was to get jwt io site to validate. Then the key was not “role” but “role_type” and now it is working. Thank you.
private string GenerateJWTSignature(string sdkKey, string sessionName, string roleParam)
{
var header = new
{
alg = “HS256”,
typ = “JWT”
};
var payload = new
{
app_key = sdkKey,
tpc = sessionName, // session name
role_type = roleParam, //roleParam, // Renamed parameter to avoid conflict (was role)
iat = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), // issued at time
exp = DateTimeOffset.UtcNow.AddMinutes(5).ToUnixTimeSeconds(), // expiration time
user_identity = Guid.NewGuid().ToString() // optional: unique identifier for the user
};
// Convert header and payload to Base64Url encoded strings
string headerBase64 = Base64UrlEncode(JsonConvert.SerializeObject(header));
string payloadBase64 = Base64UrlEncode(JsonConvert.SerializeObject(payload));
// Create the signature using HMACSHA256
string message = $"{headerBase64}.{payloadBase64}";
using (var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(_zoomSettings.SDKSecret)))
{
var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
string signature = Base64UrlEncode(hash);
string jwtToken = $"{headerBase64}.{payloadBase64}.{signature}"; // JWT Token
// Output to console/log for easy copying to clipboard
Console.WriteLine($"Generated JWT Token: {jwtToken}");
// Alternatively, return the token for use
return jwtToken;
}