# Control rooms by code

**URL:** <https://openvidu.discourse.group/t/control-rooms-by-code/2829>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [March 17, 2021, 2:33pm UTC](https://openvidu.discourse.group/t/control-rooms-by-code/2829 "2021-03-17T14:33:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PabloIDM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pabloidm/32/1396_2.png) [@PabloIDM](https://openvidu.discourse.group/u/PabloIDM)\
**Post date:** [March 17, 2021, 2:33pm UTC](https://openvidu.discourse.group/t/control-rooms-by-code/2829/1 "2021-03-17T14:33:11Z")

</div>

Hi Everyone

I’m new in openvidu, and I see that I can Create rooms only put a “something” at last in the URL. How I can control this for only create approved rooms?

I don’t see very clear in the documentation.

Thanks a lot

---

<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:** [March 18, 2021, 1:27pm UTC](https://openvidu.discourse.group/t/control-rooms-by-code/2829/2 "2021-03-18T13:27:07Z")

</div>

I don’t really understand your question.

---

<div class="post-metadata">

**Author:** ![PabloIDM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pabloidm/32/1396_2.png) [@PabloIDM](https://openvidu.discourse.group/u/PabloIDM)\
**Post date:** [March 23, 2021, 9:27am UTC](https://openvidu.discourse.group/t/control-rooms-by-code/2829/3 "2021-03-23T09:27:04Z")

</div>

Sorry,

what we want our system that we are setting up is, in some way, that only people who have validated can enter the meeting. We want to say that only those to whom we have sent a link to the email, or that we can verify their email can access the videoconference.

A way to restrict access to a conference url.

Thanks

---

<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:** [March 23, 2021, 9:39am UTC](https://openvidu.discourse.group/t/control-rooms-by-code/2829/4 "2021-03-23T09:39:07Z")

</div>

Sure. Every client needs a token to connect to a specific Session. The lifecycle of a session is:

1. You initialize the Session from your application’s backend.
2. You create a Connection for every user that will join the Session, also from your application’s backend. This Connection has a “token” property, that must be passed to the client-side.
3. In the client-side, you consume the token on method `session.connect(token)`.

You have further information here: **[https://docs.openvidu.io/en/latest/cheatsheet/join-session/](https://docs.openvidu.io/en/latest/cheatsheet/join-session/)**

For example, OpenVidu Call demo application ([OpenviduCall](https://demos.openvidu.io/openvidu-call/#/)) simply initializes any Session that is requested and is not already created, and then generates a Connection for every user that requests it. It doesn’t ask for a password or any other identification method, but it could if necessary.

Best regards.

---

<div class="post-metadata">

**Author:** ![PabloIDM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pabloidm/32/1396_2.png) [@PabloIDM](https://openvidu.discourse.group/u/PabloIDM)\
**Post date:** [March 23, 2021, 9:48am UTC](https://openvidu.discourse.group/t/control-rooms-by-code/2829/5 "2021-03-23T09:48:03Z")

</div>

Thanks a lot for your answer
