How to integrate Video SDK in Web in Pure JavaScript without Node Server

Hi everyone,

(I am sorry for my bad English)

I have been working with the video SDK to integrate into my website but I have been facing one issue and I am confused about that. The video SDK I have downloaded is setup in node and I have to setup node modules and then start node server to test this.

But I don’t want to use node modules in my website, I am looking for alterative solution of SDK in JavaScript so I can implement it, but in zoom documentation there is no help about this and no package available for JavaScript.

For Zoom Meetings they were also providing CDN links instead of node modules to integrate zoom meeting and I used that which worked fine for me.

But now for zoom video SDK i tried and searched a lot but not able to find any CDN links for this video SDK.

Is there anyone who have implemented video SDK in website without node modules, Please I need your guidance.
Your help will be really appreciated.

Hafiz

Hi @a.hamza ,

Thank you for your post! Please see this previous post for a link to the CDN via unpkg and let me know if this helps.

Thanks,
Rehema

Hi @rehema.zoom

yeah thank you for providing that link, its helpful for me.

But now I am getting struck with one more issue of signature token, its not working and always saying (This account does not exist or does not belong to you)

I have been working with the video SDK implementation in one of my project. I have been using the PHP JWT to generate the signature for the SDK to join video session. But every time i try to join the session, it returns an error in console type: This account does not exist or does not belong to you

I tried multiple times but struck with the same issue, Can you please help me with this issue, Here I am attaching the code section how I am generating the signature. I followed the documentation to generate token. https://marketplace.zoom.us/docs/sdk/video/auth/

This is the function I am using to generate signature.

Thanks

HI @a.hamza ,

Thanks for letting me know the link was helpful! For this current error, can you please try your Video SDK credentials with the Video SDK web sample application and let me know if the same error occurs?

Thanks,
Rehema

Hi @rehema.zoom

Yes I tried the Video SDK web sample application and it works fine with that as it generate the signature with the node signature package GitHub - zoom/videosdk-sample-signature-node.js: Generate a signature to Start and Join Sessions with the Zoom Video SDKs.

But the problem is when I use the PHP based function to generate signature, then this error appears. As I have my application in pure HTML and JS and not using any node server and don’t want to use it so for security purpose I will have to generate signature in my server side (PHP) and then will pass it to JS to start video session, but its always with this error (This account does not exist or does not belong to you )

Here Is the function I used to generate the signature in PHP

private function generateSessionSignature($topic, $role, $sessionKey, $password)
    {
        $key = Constants::ZOOM_API_KEY;
        $secret = Constants::ZOOM_API_SECRET;
        $payload = [
            'app_key' => $key,
            'tpc' => $topic,
            'version' => 1,
            'role_type' => $role,
            'user_identity' => null,
            'session_key' => $sessionKey,
            'iat' => time(),
            'exp' => strtotime('+40 minute'),
            'pwd' => $password,
        ];
        return JWT::encode($payload, $secret, 'HS256');
    }

I am passing the required parameters in function parameters from my coding logic. I hope this will help you to track the problem if there is with my function logic to generate signature.

Thanks,
Hafiz

Hi @rehema.zoom,
I hope you are doing well.

Are you around ? Any recommendations ? I am waiting for any solution to this problem.

I would really appreciate it. :slight_smile:

Thanks,
Hafiz

Hi @a.hamza,

Doing some digging on this issue. I will reach back out with an update as soon as possible. Thank you for your patience!

Thanks,
Rehema

Hey @a.hamza

Could you verify the signature on the site https://jwt.io/ to make sure the signature is valid?

Thanks
Vic

Hi @vic.yang

Yes I verified the token at https://jwt.io/ and it was valid.

Hi @rehema.zoom

I haven’t heard from you since then, but I have resolved the issue myself. It was due to the password for the session. Your documentation had a little conflict for the password parameters, when generating signature, the password parameter was optional (according to documentation) but for joining the session, password field is required. Which is confused thing, when i didn’t set password at signature creation then it should be optional for joining session as well or it should be required for both APIs, Otherwise it can be a conflict.
What is the need of password when I set it empty in signature.

thank you for sharing

1 Like

Here is the session regarding Zoom Video SDK Integration using ReactJS.

1 Like

Hi @a.hamza ,

I apologize, the late reply is due to the holiday season. I’m glad you figured out the issue, but see what you’re referring to about the confusion in the documentation, and why a password is needed if it is only set to ‘empty’. I will speak with the appropriate about seeing if this is a change that should be made in documentation/how this can be clearer.

Thanks,
Rehema