# In Web Video SDK UIToolKit, how to get the session duration using API?

**URL:** <https://devforum.zoom.us/t/in-web-video-sdk-uitoolkit-how-to-get-the-session-duration-using-api/128592>\
**Category:** UI ToolKit\
**Tags:** video-sdk\
**Created:** [February 26, 2025, 10:45am UTC](https://devforum.zoom.us/t/in-web-video-sdk-uitoolkit-how-to-get-the-session-duration-using-api/128592 "2025-02-26T10:45:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishwajeetbhosale](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@vishwajeetbhosale](https://devforum.zoom.us/u/vishwajeetbhosale)\
**Post date:** [February 26, 2025, 10:45am UTC](https://devforum.zoom.us/t/in-web-video-sdk-uitoolkit-how-to-get-the-session-duration-using-api/128592/1 "2025-02-26T10:45:39Z")

</div>

I’m using Web Video SDK UIToolkit 2.1.0-1 in Angular application and my question is how can I get a session duration using API?

Suppose Host ‘A’ is joined and ‘B’ joined as participant, and ‘A’ joined at 10:00 AM and ‘B’ joined at 10:05 AM and session ended on 10:30 AM, I want to get this duration of 25 minutes, why 25 minutes as participant joined 10:05 AM, so 10:05 AM to 10:30 AM.

CC: @tommy

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [February 27, 2025, 9:01am UTC](https://devforum.zoom.us/t/in-web-video-sdk-uitoolkit-how-to-get-the-session-duration-using-api/128592/2 "2025-02-27T09:01:44Z")

</div>

You can use the Video SDK API for getting user list from a session including their join and leave time:

```auto
GET /videosdk/sessions/{sessionId}/users

```

```auto
{
...
  "users": [
    {
      "id": "32dsfsd4g5gd",
      "name": "exampleuser",
      "join_time": "2019-08-20T19:09:01Z",
      "leave_time": "2019-08-20T19:19:01Z",
      "user_key": "myUserKey",
    }
  ]
....
}

```

> **[Video SDK APIs - Zoom Developers](https://developers.zoom.us/docs/api/video-sdk/#tag/sessions/GET/videosdk/sessions/%7BsessionId%7D/users)**
>
> API reference for: Video SDK

---

<div class="post-metadata">

**Author:** ![vishwajeetbhosale](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@vishwajeetbhosale](https://devforum.zoom.us/u/vishwajeetbhosale)\
**Post date:** [February 28, 2025, 8:06am UTC](https://devforum.zoom.us/t/in-web-video-sdk-uitoolkit-how-to-get-the-session-duration-using-api/128592/3 "2025-02-28T08:06:53Z")

</div>

@ekaansh.zoom,  
Thanks for the reply.  
can you tell me the how duration is getting calculated?

Here is the example, what I’m expecting the session duration based on participant joining time.  
Suppose Host ‘A’ is joined and ‘B’ joined as participant, and ‘A’ joined at 10:00 AM and ‘B’ joined at 10:05 AM and session ended on 10:30 AM, duration will be 25 minutes, why 25 minutes because participant joined 10:05 AM, so 10:05 AM to 10:30 AM.

And is there any way we can get duration liked above mentioned scenario?

Also is it possible to get session details base on session name not on session id?  
Because, if user joined the one session multiple times and then for every time there is new session id I can see there, so how I can log proper session duration?  
Regardless of joining multiple times this is a single session at the end, as user joining the same session.

---

<div class="post-metadata">

**Author:** ![vishwajeetbhosale](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@vishwajeetbhosale](https://devforum.zoom.us/u/vishwajeetbhosale)\
**Post date:** [March 3, 2025, 2:55pm UTC](https://devforum.zoom.us/t/in-web-video-sdk-uitoolkit-how-to-get-the-session-duration-using-api/128592/4 "2025-03-03T14:55:19Z")

</div>

@ekaansh.zoom, any update on above?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 11, 2025, 10:25pm UTC](https://devforum.zoom.us/t/in-web-video-sdk-uitoolkit-how-to-get-the-session-duration-using-api/128592/5 "2025-03-11T22:25:35Z")

</div>

Hey @vishwajeetbhosale ,

To calculate duration you can add each user join and leave time together for a session. Minutes are rounded up in terms of billing calculations.

We are working on adding a new property to the API called `total_minutes` to make it easier to get the total session participants calculation.

You can also get a session based on session name by using the `session_name` query param on the List Sessions API:

> **[Video SDK APIs - Zoom Developers](https://developers.zoom.us/docs/api/video-sdk/#tag/sessions/GET/videosdk/sessions)**
>
> API reference for: Video SDK

Best,  
Tommy
