Home
/ Blog /
Create join links with room codesMay 3, 20234 min read
Share
Live video experiences have become more popular and widely enable use cases such as online meetings, webinars, and virtual events. One of the most common ways to join these live video experiences is through meeting links that allow users to easily access the video platform or application.
Links for live video experiences can be found in calendar invites, WhatsApp messages, emails which redirects to a page to join the live video or even embedded as iframes.
To simplify these experiences, we've launched Room Codes to quickly launch and go-live with 100ms Prebuilt and custom (self-hosted) room links.
A 100ms Room can have multiple roles, and each role can be configured with unique and distinct permissions. This lets you define custom experiences for different roles in a 100ms room using Room Templates.
Once you've set up a 100ms room, your users will need a room link to join a room that you’ve created. You'll also need to ensure that your users join a room with the intended role permissions meant for them. Room Codes allow you to do just that. These are 10 digit unique short codes that represent a room id/role combination.
Let’s take a look at how Room Codes can help you integrate 100ms when building 100ms Prebuilt or Custom UI solutions.
100ms Prebuilt is a no-code feature rich video conferencing web application, which can be accessed using a Prebuilt Room Link, or embedded as an iFrame in your application
Generate role specific room links with a format https://your-template-subdomain
.app.100ms.live/meeting/room-code
, where
template-subdomain
when using Prebuilt room links. This is the subdomain that you define at the time of Template creation; can be accessed from Template details page on 100ms Dashboard.room_id
and role
for which you're creating the Room Link. Get room codes for each role
- Alternatively, you can use [Create Room Codes API](https://www.100ms.live/docs/server-side/v2/api-reference/room-codes/create-room-code-api) to create room codes
# template info
template_id = "639cb27a0c77c9782cc50e7b"
template_subdomain = "<your-template-subdomain>.app.100ms.live"
# create room
room_response = create_room(template_id)
# create room code for the above created room
room_codes = create_room_codes(room_response["id"])
# create create room links by appending room_code to template_subdomain
# room_link = https://<template-subdomain>/meeting/<room-code>
room_links = {}
for data in room_codes:
room_links[data["role"]] = "https://"+template_subdomain+"/meeting/"+data["code"]
print(room_links)
Joining a room requires Auth token. When using Prebuilt, Prebuilt takes care of generating Auth Token implicitly using the room code accessible in the Prebuilt room link. So you don’t have to handle anything!
When self-hosting your application, build google meet like urls(meet.your.app/abc-pqrs-xyz) and embed those in your custom app, create Custom Room Links hosted on your domain with a format that looks like “https://your-domain
/room-code
.
room-code-for-host
room-code-for-guest
Room codes can also power join room authentication without setting up an auth token server at your end
getAuthTokenByRoomCode
SDK method to fetch auth token using room codeIf your use case doesn’t require joining rooms with a “room link” experience and not sharing links with end users, but rather have an embedded experience built within your application, you may not want to allow peers joining in from room links. In such scenario, you can disable “join with room links” experience by disabling room codes globally for a workspace from Developer section on 100ms dashboard.
With Room codes, you can share encrypted ‘short-codes’ in your room link that inherently represents a role and room_id. With unique room codes, roles can join rooms with their unique room links without exposing role or room_id in the link.
With this, you can get started with room codes and start sharing links with your users. Here are some references to get started
Have any questions? Ask the 100ms team on Discord. Join here.
Product & news
Share
Related articles
See all articles