# Preview connections in session

**URL:** <https://openvidu.discourse.group/t/preview-connections-in-session/4203>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [September 20, 2022, 7:32pm UTC](https://openvidu.discourse.group/t/preview-connections-in-session/4203 "2022-09-20T19:32:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard\_appsari](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/richard_appsari/32/769_2.png) [@richard\_appsari](https://openvidu.discourse.group/u/richard_appsari)\
**Post date:** [September 20, 2022, 7:32pm UTC](https://openvidu.discourse.group/t/preview-connections-in-session/4203/1 "2022-09-20T19:32:39Z")

</div>

When having a Google Meet video call you get to see a list of people already connected to the call.

I’d like to implement this feature using OpenVidu and wonder if there is a recommended way of doing this.

I am guessing that we can accomplish this by polling the OpenVidu REST API, `/openvidu/api/sessions/<SESSION_ID>`, every x seconds. It would give us a list of connections objects.

Is there any way to accomplish this via the openvidu-browser API, by subscribing and not polling?

---

<div class="post-metadata">

**Author:** ![CSantosM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/csantosm/32/16_2.png) [@CSantosM](https://openvidu.discourse.group/u/CSantosM)\
**Post date:** [September 21, 2022, 8:34am UTC](https://openvidu.discourse.group/t/preview-connections-in-session/4203/2 "2022-09-21T08:34:52Z")

</div>

Hi, this feature is already included on our official OpenVidu Call (which uses OpenVidu Components). Check it out [here](https://openvidu.io/openvidu-call)

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [September 21, 2022, 9:13am UTC](https://openvidu.discourse.group/t/preview-connections-in-session/4203/3 "2022-09-21T09:13:45Z")

</div>

Any user connected to a Session always has this information available. You don’t actually need to call the REST API and send the information to your client-side to achieve this.  
Just listen to `connectionCreated` events on your frontend. `connectionCreated` event is fired for any user connecting to the Session. `connectionDestroyed` event is fired for any user leaving the Session. With these two events, you will always have available the participants connected to a Session in all clients: [ConnectionEvent | OpenVidu Browser - v2.22.0](https://docs.openvidu.io/en/2.22.0/api/openvidu-browser/classes/ConnectionEvent.html)

---

<div class="post-metadata">

**Author:** ![richard\_appsari](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/richard_appsari/32/769_2.png) [@richard\_appsari](https://openvidu.discourse.group/u/richard_appsari)\
**Post date:** [September 27, 2022, 11:41am UTC](https://openvidu.discourse.group/t/preview-connections-in-session/4203/4 "2022-09-27T11:41:26Z")

</div>

Thank you @CSantosM & @pabloFuente
