# Facing Issue in Video SDK Web Integration

**URL:** <https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540>\
**Category:** Video SDK\
**Tags:** video-sdk\
**Created:** [February 9, 2024, 10:22am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540 "2024-02-09T10:22:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 9, 2024, 10:22am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/1 "2024-02-09T10:22:08Z")

</div>

Video SDK Type - Web  
SDK version - 1.10.7  
Issue - 1 : I need to set session time .  
I am using this config.  
{  
sdkKey: 'XXXXXXXXX,  
sdkSecret: ‘XXXXXXXXXXXX’,  
webEndpoint: ‘[zoom.us](http://zoom.us)’,  
topic: ‘XXX’,  
name: `XXXX`,  
password: ‘XXXXX’,  
signature: ‘’,  
sessionKey: ‘’,  
userIdentity: ‘’,  
role: 1  
}  
For join : join(topic, signature, name, password)  
Where need to set the session time. Is there a way to set session time in Client side .Kindly guide me .

Issue -2 : Is there any way to force end the whole session from client side . In case the Host leaves the session without ending and doesn’t return.

Issue - 3 : By changing the role value to 0 and tries to join the room. When host removes the participant . The same particicpant can able to re-join after ZoomClient.destroyClient() and re - initiate the join method ZoomClient.join(). Can you explain why this happens ?  
The zoomId and userId gets different even though i use the same -  
topic: ‘XXX’,  
name: `XXXX`,  
password: ‘XXXXX’,  
signature: ‘’,

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 14, 2024, 5:05am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/2 "2024-02-14T05:05:36Z")

</div>

@siddharth23 ,

1. There is no concept of scheduling or session time for Video SDK. The call is started on demand.

2. If you are asking if there is a way to end a session in case the host doesnt end, yes there is. You can end a session using the Video SDK REST API  
[Zoom Video SDK API](https://developers.zoom.us/docs/video-sdk/apis/#operation/sessionStatus)

3. You might need to elaborate this a little bit. I’ll try to explain this from what I understand from your question.

Even if the topic name is the same, the 1st session which has ended is not the same session as the 2nd session which the participant joins. They have different sessionId on your [zoom.us](http://zoom.us) dashboard.

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 16, 2024, 5:32am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/3 "2024-02-16T05:32:29Z")

</div>

Thanks for the reply , Is there any sample git hub where **Video SDK REST API** has been intergrated with Video SDK Web it would be helpful .

I have **Query** - While Developer account creation should i need to pay or add any extra feature for Video SDK REST API

Reg - Issue 3 : **Participant able to rejoin**  
In my code :  
signature creation : { alg: ‘HS256’, typ: ‘JWT’ };  
I am using this host config  
{  
sdkKey: 'XXXXXXXXX,  
sdkSecret: ‘XXXXXXXXXXXX’,  
webEndpoint: ‘[zoom.us](http://zoom.us/)’,  
topic: ‘XXX’,  
name: `XXXX` ,  
password: ‘XXXXX’,  
signature: ‘’,  
sessionKey: ‘’,  
userIdentity: ‘’,  
role: 1  
}  
And for partciapnt : same config with role as 0  
{  
sdkKey: 'XXXXXXXXX,  
sdkSecret: ‘XXXXXXXXXXXX’,  
webEndpoint: ‘[zoom.us](http://zoom.us/)’,  
topic: ‘XXX’,  
name: `XXXX` ,  
password: ‘XXXXX’,  
signature: ‘’,  
sessionKey: ‘’,  
userIdentity: ‘’,  
role: 1  
}  
**Note : ZoomClient gets destroy and re-initiated on refresh**

Here i am only passing the username and session name but after zoom.join() in response i am able to get **sessionId , userId and zoomId**. when host removes the participant from room , he able to join the room with same configuration after refreshing with **sessionId , userId and zoomId** gets vary .

How can i predefined set the sessionId and userId from the client side config to avoid the praticipant rejoin or is there any other way to stop the participant from rejoin . Kindly guide me.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 16, 2024, 7:44am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/4 "2024-02-16T07:44:49Z")

</div>

> Is there any sample git hub where **Video SDK REST API** has been intergrated with Video SDK Web it would be helpful .

No there isn’t but there is a postman workspace for you to easily call the API for dev and test  
[https://www.postman.com/zoom-developer/workspace/zoom-public-workspace/documentation/22097587-88699248-914a-4197-be40-0776c687db20](https://www.postman.com/zoom-developer/workspace/zoom-public-workspace/documentation/22097587-88699248-914a-4197-be40-0776c687db20)

> I have **Query** - While Developer account creation should i need to pay or add any extra feature for Video SDK REST API

There is no additional fees associated with REST API.

> How can i predefined set the sessionId and userId from the client side config to avoid the praticipant rejoin or is there any other way to stop the participant from rejoin . Kindly guide me.

You can provide the Video SDK Auth / Signature only once to the user, and ensure that it expires within a short timeframe.

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 18, 2024, 7:12am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/5 "2024-02-18T07:12:54Z")

</div>

Hi @chunsiong.zoom Thanks for the reply .  
I tried using the web rest API . I am getting the response  
ex:  
**API** : [https://api.zoom.us/v2/videosdk/sessions/${doubleEncodeded}?type=live](https://api.zoom.us/v2/videosdk/sessions/$%7BdoubleEncodeded%7D?type=live)  
with **jwt** token in header  
**Response** : {“code”:2300,“message”:“This API endpoint is not recognized.”}  
First I Got CORS ISSUE and i resolved it by creating a proxy serve in my client side now i am facing this issue .  
Here is my response header tracking ID :  
v=2.0;clid=aw1;rid=WEB\_4b7a7dc0d472cd87f19fbaf1ad9ce97a  
Kindly guide in this .

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 19, 2024, 2:39am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/6 "2024-02-19T02:39:16Z")

</div>

@siddharth23 ,

There is no /v2/api/videosdk/sessions/  
It should be /v2/videosdk/session/

Could you double check on the code level for the URL?

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 19, 2024, 5:41am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/7 "2024-02-19T05:41:59Z")

</div>

The proxy server re-write path was not working , i removed it . Still i am facing  
{“code”:124,“message”:“Invalid access token.”}  
**Tracking ID** : v=2.0;clid=aw1;rid=WEB\_e428346abfc83575686463923ea09b4b  
I create the JWT Token using these concept as mention in the docs

**const KJUR = require(‘jsrsasign’)**  
**// [jsrsasign - npm](https://www.npmjs.com/package/jsrsasign)**  
**function generateVideoSdkApiJwt(sdkApiKey, sdkApiSecret) {**

\*\* const iat = Math.round((new Date().getTime() - 30000) / 1000)\*\*  
\*\* const exp = iat + 60 \* 60 \* 2\*\*  
\*\* const oHeader = { alg: ‘HS256’, typ: ‘JWT’ }\*\*

\*\* const oPayload = {\*\*  
\*\* iss: sdkApiKey,\*\*  
\*\* iat: iat,\*\*  
\*\* exp: exp\*\*  
\*\* }\*\*

\*\* const sHeader = JSON.stringify(oHeader)\*\*  
\*\* const sPayload = JSON.stringify(oPayload)\*\*  
\*\* const videosdk\_api\_token = KJUR.jws.JWS.sign(‘HS256’, sHeader, sPayload, sdkApiSecret)\*\*  
\*\* return videosdk\_api\_token\*\*  
**}**

**console.log(generateVideoSdkApiJwt(process.env.VIDEO\_SDK\_API\_KEY, process.env.VIDEO\_SDK\_API\_SECRET))**

Kindly guide me where i am doing . How to solve the Invalid access token issue

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 19, 2024, 6:11am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/8 "2024-02-19T06:11:55Z")

</div>

@siddharth23 ,

for troubleshooting, could you trying using the JWT token found on [marketplace.zoom.us](http://marketplace.zoom.us)?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/1/a1818d505c4ea8057254022c8c43447c62ccaad6.png)

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 19, 2024, 6:44am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/9 "2024-02-19T06:44:26Z")

</div>

@chunsiong.zoom Thanks for the troubleshoot solution  
Using the Zoom account JWT token token error is resolved.  
**Query 1** : As mentioned above the signature creation of JWT is working fine to create a session , but using it in header for TOKEN AUTHENTICATION for RESTAPI is not working . May i know why?

**Scenario :** I am Host  
In config i am using session name as “XXXXXXXXX”.  
While joining zmClient.join(topic, signature, name, password) in response i am getting the **sessionId**. I am doubleencoding the sessionId and using RESTAPI to check the status  
API : v2/videosdk/sessions/AP%252BkHiVdT7aHO3F1cxkjGw%253D%253D?type=live  
Response : {“code”:3001,“message”:“Session does not exist.”}  
**Double Encoded** :  
const encoded=encodeURIComponent(sessionId);  
const doubleEncodeded = encodeURIComponent(encoded);

But the host is in the session . May i know why i am facing this?.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 19, 2024, 8:01am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/10 "2024-02-19T08:01:21Z")

</div>

@siddharth23

The API Key and API Secret is used to generate the JWT token for API Access

You cannot use SDK Key and SDK Secret to generate a JWT token for API Access  
SDK Key and SDK Secret is only used for SDK Auth.

You might not need to doubleencode the sessionID

Here’s a sample of my sessionID

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/d/2d666fca7d90f0d70c57aeac50e53cef9074bd4a.png)

and here’s how it looks like from a REST API call on POSTMAN

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/5/a5c950887856f48c38caffe7089673d30dd07abd.png)

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 19, 2024, 11:01am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/11 "2024-02-19T11:01:12Z")

</div>

Hi @chunsiong.zoom Thanks for the reply . After a creating a JWT using API key and secret . I am able to solve the autentication error .

Scenario : When the host close the tab and comes after a long time . I have a spec that i need to show re-join if the session is still active .

Issue : I have a session name and topic name ,  
**config.file**  
sdkKey: ‘XXXX,  
sdkSecret: XXXX,  
webEndpoint: ‘[zoom.us](http://zoom.us)’,  
topic: ‘XXXX’,  
name: `XXX`,  
password: ‘XXX’,  
signature: ‘’,  
sessionKey:’',  
userIdentity: ‘’,  
role : 1,

I am able to get the sessionId in zoom.join(). The sessionId gets vary on each time refresh and try to join.  
I need to know

1. Does the zoom.join() make a new session each time .
2. Is there a way to send sessionId from Client Side.

How to prevent the multiple sessionId . How i can achieve the re-join flow.Kindly guide in this.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 19, 2024, 11:46am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/12 "2024-02-19T11:46:00Z")

</div>

> [@siddharth23](#):
>
> I have a spec that i need to show re-join if the session is still active .

If there is no one in the session for a while, the session will end. In this scenario, the session ID will change.

> I am able to get the sessionId in zoom.join(). The sessionId gets vary on each time refresh and try to join.

This will happen if the host ends the session, or when everyone leaves the session.

> 1. Does the zoom.join() make a new session each time .
> 2. Is there a way to send sessionId from Client Side.

1. Only if the session has ended, or everyone has left the session.
2. You are able to get the sessionId from zoom.join right? That is the Client side I presume?

> How to prevent the multiple sessionId . How i can achieve the re-join flow.Kindly guide in this.

Multiple sessionId is part of the design. As long as the session ends, a new sessionId is assigned to the next session with the same topic name.

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 19, 2024, 12:47pm UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/13 "2024-02-19T12:47:02Z")

</div>

Hi @chunsiong.zoom Thanks for your response .  
I am using proxy server in my client side . I am able to hit GET api sucessfully.  
But i am facing Invalid CORS request for PUT api.  
This my response tracking ID :  
v=2.0;clid=aw1;rid=WEB\_b25fdad03523d7143b7f90c3fc73c078  
Kindly help me in this.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 19, 2024, 1:35pm UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/14 "2024-02-19T13:35:46Z")

</div>

@siddharth23 ,

can you make sure you are calling the right URL endpoint?  
PUT is supported on

PUT /videosdk/sessions/{sessionId}/status

It is NOT support on  
/videosdk/sessions/{sessionId}

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 19, 2024, 1:44pm UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/15 "2024-02-19T13:44:45Z")

</div>

@chunsiong.zoom I am hitting this endpoint  
videosdk/sessions/ezaQ71HWRHmHfAcYNJMI2A%253D%253D/status  
Facing Invalid CORS request for PUT api  
Tracking ID : v=2.0;clid=aw1;rid=WEB\_860f65d7476f8bae8352fb0c653ac55d  
Kindly have a look at this Tracking ID.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 21, 2024, 4:01am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/16 "2024-02-21T04:01:33Z")

</div>

@siddharth23 , are you doing something different when calling this API?  
It seems that this request was being flagged by the firewall.

Could you tell me more about the implementation and the CORS?

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 21, 2024, 6:09am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/17 "2024-02-21T06:09:08Z")

</div>

@chunsiong.zoom  
I am using VIDEO SDK in my react application. I am using localhost environment for testing  
**Scenario** : Need to Update the status of the session as end.  
**API :** PUT /videosdk/sessions/{sessionId}/status  
**SPEC :** I need to handle this API’s calls from Client-side without back-end support.  
**Issues Facing:**  
I tried calling a GET API from CLIENT side - I got CORS ISSUE.  
To Solve **CORS ISSUE** : I used a proxy middleware in client side using a third party package.  
CODE EXAMPLE:  
const { createProxyMiddleware } = require(‘http-proxy-middleware’);  
module.exports = function (app) {  
app.use(  
‘/v2/’,  
createProxyMiddleware({  
target: ‘[https://api.zoom.us/](https://api.zoom.us/)’,  
changeOrigin: true,  
})  
);  
};  
**API CALL** :  
Axios.put(`/v2/videosdk/sessions/${doubleEncodeded}/status`,{  
action : “end”  
},{  
headers : {  
authorization: `Bearer ${JWTtoken}`,  
},  
}  
Get API’s are working Fine but i am getting issue while POST/PATCH/PUT.  
Kindly guide me how to resolve the cors issue.  
**Query** : For testing purpose i used Third party MiddleWare . In My application i need to avoid that . Kindly guide is there any way to avoid the CORS issue without middle ware.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 21, 2024, 7:40am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/18 "2024-02-21T07:40:54Z")

</div>

@siddharth23, this sounds like a deployment and http-proxy-middleware issue. as this falls likely outside of the scope of this forum, I’ll refrain from commenting on it.

---

<div class="post-metadata">

**Author:** ![siddharth23](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@siddharth23](https://devforum.zoom.us/u/siddharth23)\
**Post date:** [February 21, 2024, 12:18pm UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/19 "2024-02-21T12:18:58Z")

</div>

@chunsiong.zoom  
My bad apologies . I just want to know . I am facing CORS Issue while trying to call ZOOM REST API from my client side . Kindly guide me . How to Fix This?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [February 22, 2024, 2:07am UTC](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540/20 "2024-02-22T02:07:50Z")

</div>

@siddharth23 , you might want to search up some thread on this forum.  
The API should be called from server side, calling it from client will throw CORS error.

[Next page](https://devforum.zoom.us/t/facing-issue-in-video-sdk-web-integration/103540.md?page=2)
