A Room Code is a unique encrypted short code generated by 100ms for a given Role and Room. A Room Code represents a unique role and room_id combination.

Why use Room Codes?

Essentially, Room Codes allow you to create unique Room Links and Room Code Authentication mechanism for every Role in a Room.

Room Links

Construct Prebuilt or custom domain Room Links; embed and share with your users

Room Links using Room Codes

Room Code Authentication

Power Role specific authentication required to Join a Room

Join with Room Codes

Room Codes Basics

  • Room codes are 10 digit short codes and follow a standard format - ***-****-***
  • Room codes require a Template, a Room and at least one Role to be created.

Room Code Lifecycle

A Room Code is a binary state entity represented by enabled: true | false. - enabled:true represents an enabled Room Code. Effectively, Room links and Room Code Authentication work with only enabled Room Codes. - enabled:false represents a disabled Room Code. Room links and Room Code Authentication does not work with disabled Room Codes.

You can get the state of a Room Code enable:true|false using Get Room Code API. Always make sure that this flag is enabled before creating Room Links or performing a peer join using Room Code Authentication.

You can manage the state of a Room Code for a Role and make it enabled/disabled using Update Room Code API

Room Codes do not expire

Room Codes do not have an expiry, thus, you can reuse Room Codes infinitely. This enables “fixed Room Links” that can be reused / re-shared or allocated to your end users. No need to generate new Room Links for every Session for a given room_id. However, if your use case requires "fresh Room Links", you should first disable existing Room Code and then generate new Room Codes

Creating Room Codes

If you're using Create Room API to create Rooms, you need to explicitly create Room Codes for every Role in the Room. Refer Create Room Codes API. This API allows you to create Room Code for - every Role in the Room at once - a specific Role in the Room

Multiple Room Codes per Role

100ms also supports multiple Room Codes per Role (up to 100 Room Codes per Room). This means that each user for a given Role can be associated with a unique Room Code, and thus allow you to created unique room links for each user and unique Room Code based authentication. Please handle the logic to map Room Codes on user level at your end as we support Room Code creation only on Role and not Peer level. Drop a feedback if you want us to support this.

Have a suggestion? Recommend changes ->

Run in postman

Was this helpful?