OpenVidu Meet External Members Tutorial#
This tutorial extends the basic OpenVidu Meet WebComponent tutorial to show how to add external members to an OpenVidu Meet room.
An external member is a participant with a fixed name and a unique access link that grants access to the room without any login. Each link is meant to be delivered privately to a single person and can be revoked individually.
Building on the basic tutorial, it adds the following features:
- Users can add an external member to a room by name, with a base role (
moderatororspeaker). - Each external member gets a unique access link that can be copied and shared.
- Users can list and remove the members of a room, revoking their access.
- Anyone can join the meeting through a member's unique link, with no login required.
The application uses the OpenVidu Meet API to manage rooms and room members, and the OpenVidu Meet WebComponent to embed the meeting.
Registered vs. external members
Room members can be either registered members (real OpenVidu Meet users, covered in the Registered Members tutorial) or external members. Registered members share the room's authenticated access URL and log in with their credentials; external members instead receive a unique access link that requires no authentication. See Room Access for the full picture.
Running this tutorial#
1. Run OpenVidu Meet#
You need Docker Desktop. You can install it on Windows , Mac or Linux .
Run this command in Docker Desktop's terminal:
Info
For a detailed guide on how to run OpenVidu Meet locally, visit Try OpenVidu Meet locally .
2. Download the tutorial code#
3. Run the application#
To run this application, you need Node.js (≥ 18) installed on your device.
- Navigate into the application directory
- Install dependencies
- Run the application
Once the server is up and running, you can test the application by visiting http://localhost:6080. You should see a screen like this:
Understanding the code#
This tutorial builds upon the basic OpenVidu Meet WebComponent tutorial, adding external member management. We'll focus on the new features and modifications related to external members.
Backend modifications#
Besides the usual room endpoints (POST /rooms, GET /rooms, DELETE /rooms/:roomId), the server exposes endpoints to manage external members:
POST /rooms/:roomId/members: Add an external member to a room.GET /rooms/:roomId/members: List the external members of a room.DELETE /rooms/:roomId/members/:memberId: Remove an external member from a room.
Add external member#
The POST /rooms/:roomId/members endpoint adds an external member to a room:
| index.js | |
|---|---|
| |
- The
roomIdis obtained from the request parameters. - The
nameof the external member and thebaseRoleare obtained from the request body. - The
nameis the fixed display name the participant will have in the meeting. Providingname(and notuserId) is what tells the API to create a member of typeexternal. - The
baseRole(moderatororspeaker) defines the default set of permissions for the member.
This endpoint adds the external member by sending a POST request to the rooms/:roomId/members endpoint. The API responds with the created member, which includes a generated memberId (in the form ext-XXXX) and a unique accessUrl such as http://localhost:9080/meet/room/<roomId>?secret=ext-XXXX. That URL is unique to this member and grants access to the room with no login required.
Info
You can fine-tune the member's permissions beyond the base role by including a customPermissions object in the request. See the addRoomMember operation in the REST API reference for the full list of permissions.
List external members#
The GET /rooms/:roomId/members endpoint lists the external members of a room:
| index.js | |
|---|---|
| |
- List the room members by sending a
GETrequest to therooms/:roomId/membersendpoint, filtering bytype=externalto retrieve only the external members.
Remove external member#
The DELETE /rooms/:roomId/members/:memberId endpoint removes an external member, revoking their unique link:
| index.js | |
|---|---|
| |
- Remove the member by sending a
DELETErequest to therooms/:roomId/members/:memberIdendpoint. The member's unique link stops working immediately; if they are currently in the meeting, they are expelled from it.
Frontend modifications#
The client application now manages rooms from the home view and manages the external members of a room from a dedicated members view, where each member shows its unique access link. The main changes introduced in the frontend are in the public/js/app.js file, which now includes functions to render the members list, add a member, copy the access link and join the meeting through that link.
Rendering the members list#
The getMemberListItemTemplate() function builds each member item, showing the name, the base role, the unique access link, and buttons to copy the link, join the meeting and remove the member:
| app.js | |
|---|---|
| |
Each item displays the member's fixed name, a badge with its baseRole, and its unique accessUrl. The three buttons call copyAccessUrl() to copy the link to the clipboard, joinRoom() to open the meeting in the app, and removeMember() to revoke the member.
Adding an external member#
When the "Add member" form is submitted, the addMember() function creates the external member with the provided name and role:
| app.js | |
|---|---|
| |
- Get the member's
nameand the chosenbaseRolefrom the form. - Make a
POSTrequest to the/rooms/:roomId/membersendpoint to add the external member to the current room. - Add the returned member (including its generated
memberIdand uniqueaccessUrl) to the localmembersmap and re-render the list.
Copying the access link#
The copyAccessUrl() function copies the member's unique link to the clipboard and briefly shows a confirmation:
| app.js | |
|---|---|
| |
- Copy the member's unique
accessUrlto the clipboard using the Clipboard API. - Temporarily swap the copy icon for a check icon to confirm the link was copied. This unique link is what you would deliver privately to the intended participant.
Joining the room through a unique link#
The joinRoom() function embeds the OpenVidu Meet WebComponent pointing to the member's unique accessUrl:
| app.js | |
|---|---|
| |
- Get the member's unique
accessUrl. - Inject the OpenVidu Meet WebComponent with the
room-urlattribute set to that URL. Because the URL already carries the member's secret, the participant enters the meeting directly with the fixed name and no login. - Add a listener for the
closedevent so that, when the component is closed, the meeting is cleared and the members view is shown again.
Embedding vs. sharing the link
This tutorial embeds the meeting in the app for convenience while testing, but the main purpose of an external member is its unique access link. In a real application you would typically deliver each member's accessUrl privately (by email, message, etc.) instead of opening it yourself, and the participant would join directly through that link.
Accessing this tutorial from other computers or phones#
To access this tutorial from other computers or phones, follow these steps:
-
Ensure network connectivity: Make sure your device (computer or phone) is connected to the same network as the machine running OpenVidu Meet and this tutorial.
-
Configure OpenVidu Meet for network access: Start OpenVidu Meet by following the instructions in the Accessing OpenVidu Meet from other computers or phones section.
-
Update the OpenVidu Meet server URL: Modify the
OV_MEET_SERVER_URLenvironment variable in your.envfile to match the URL shown when OpenVidu Meet starts. -
Update the OpenVidu Meet WebComponent script URL: In the
public/index.htmlfile, update the<script>tag that includes the OpenVidu Meet WebComponent to use the same base URL as above. -
Restart the tutorial to apply the changes:
-
Access the tutorial: Open your browser and navigate to
https://192-168-1-100.openvidu-local.dev:6443(replacing192-168-1-100with your actual private IP) on the computer where you started the tutorial or any device in the same network.
Connecting this tutorial to an OpenVidu Meet production deployment#
If you have a production deployment of OpenVidu Meet (installed in a server following deployment steps ), you can connect this tutorial to it by following these steps:
-
Update the server URL: Modify the
OV_MEET_SERVER_URLenvironment variable in the.envfile to point to your OpenVidu Meet production deployment URL. -
Update the API key: Ensure the
OV_MEET_API_KEYenvironment variable in the.envfile matches the API key configured in your production deployment. See Generate an API Key section to learn how to obtain it. -
Update the OpenVidu Meet WebComponent script URL: In the
public/index.htmlfile, update the<script>tag that includes the OpenVidu Meet WebComponent to use the same base URL as above. -
Restart the tutorial to apply the changes:
Make this tutorial accessible from other computers or phones
By default, this tutorial runs on http://localhost:6080 and is only accessible from the local machine. If you want to access it from other computers or phones, you have the following options:
- Use tunneling tools: Configure tools like VS Code port forwarding , ngrok , localtunnel , or similar services to expose this tutorial to the internet with a secure (HTTPS) public URL.
- Deploy to a server: Upload this tutorial to a web server and configure it to be accessible with a secure (HTTPS) public URL. This can be done by updating the source code to manage SSL certificates or configuring a reverse proxy (e.g., Nginx, Apache) to serve it.

