Generate a new Video Room Token
POST/room_tokens
Generate a Room Token allowing a client to join a Room.
Permissions
The API token must include the following scopes: Video.
Request
- application/json
Body
required
Room's unique named identifier. Allowed characters: A-Za-z0-9_-. Up to 100 characters. The room does not have to exist when the token is created, but must exist prior to joining, or ensure auto_create_room is set to true.
my_room
A display name to use for the user. Up to 100 characters. (If not supplied, a random alphanumeric string will be returned for each authorization with this token.)
John Smith
A list of permissions, which define what user can do once they join the room.
["room.self.audio_mute","room.self.audio_unmute","room.self.video_mute","room.self.video_unmute","room.self.deaf","room.self.undeaf","room.self.set_input_volume","room.self.set_output_volume","room.self.set_input_sensitivity"]
The user can't join the room before this time. Expects RFC 3339 datetime: 2022-01-01T23:59:60Z
. Date only: 2022-01-01
will be converted to 2022-01-01T00:00:00Z
The user can't join the room after this time. Expects RFC 3339 datetime: 2022-01-01T23:59:60Z
. Date only: 2022-01-01
will be converted to 2022-01-01T00:00:00Z
Remove user from the room at this time. Expects RFC 3339 datetime: 2022-01-01T23:59:60Z
. Date only: 2022-01-01
will be converted to 2022-01-01T00:00:00Z
Remove user after they are in the room for N seconds.
900
Whether the user joins the room with their audio muted.
false
Whether the user joins the room with their video muted.
false
By default, if the user tries to use this token to join a room that doesn't exist, it will be created with default configuration. Set this to false to require the room to exist beforehand.
false
Whether to generate a video with a preview of the content of the room. This parameter has effect only if this token auto-creates the room, thus it will be ignored if the room already exists.
true
Display name used if a room is auto-created when the token joins. Maximum of 200 characters. Defaults to the value of room_name.
My Room
Whether to end the room session when the member using this token leaves the room.
false
false
Whether the user should join as a member or as a non-interactive audience participant. Audience participants cannot send audio or video.
Possible values: [audience
, member
]
member
member
Indicates what media the user is allowed to receive.
Possible values: [all
, video-only
, audio-only
]
all
video-only
Set the room meta.
{}
{"key":"value"}
Set the member meta.
{}
{"key":"value"}
Enable/disable jitter buffer audio-video sync.
false
true
Responses
- 200
- 422
OK
- application/json
- Schema
- Example (from schema)
Schema
A Room Token to be used by clients to connect to the Room.
eyJ0eXAiOiJWUlQiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2MjIxMjAxMjMsImp0aSI6ImRmMzFjYTQ4LWRiZGMtNGJjZi1hYWU2LTQ1NWEwOGM5NDg2YSIsInN1YiI6IjBjOTdmNjM1LTFjMTMtNGZjMS04NmY3LWJiMmJlODU5ZDhiOSIsInUiOiJKb2huIERvZSIsInIiOiJteV9zdXBlcl9hd2Vzb21lX3Jvb20iLCJzIjpbInJvb20uc2VsZi5hdWRpb191bm11dGUiXSwiYWNyIjp0cnVlLCJqZiI6MTYyMDg5NjQwMCwianUiOjE2MjA5MDU5NjgsInJhdCI6MTYyMDkwMDAwMCwicnNlIjo5MDB9.5mu_H2PjQLtNBbMsBlS0c91EgsDjJzvZUFgj5-tP4VA0VoHZPIGgV_DLRGKt-BqG-DqC5LhpsdMWEFjhVkTBpQ
{
"token": "eyJ0eXAiOiJWUlQiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2MjIxMjAxMjMsImp0aSI6ImRmMzFjYTQ4LWRiZGMtNGJjZi1hYWU2LTQ1NWEwOGM5NDg2YSIsInN1YiI6IjBjOTdmNjM1LTFjMTMtNGZjMS04NmY3LWJiMmJlODU5ZDhiOSIsInUiOiJKb2huIERvZSIsInIiOiJteV9zdXBlcl9hd2Vzb21lX3Jvb20iLCJzIjpbInJvb20uc2VsZi5hdWRpb191bm11dGUiXSwiYWNyIjp0cnVlLCJqZiI6MTYyMDg5NjQwMCwianUiOjE2MjA5MDU5NjgsInJhdCI6MTYyMDkwMDAwMCwicnNlIjo5MDB9.5mu_H2PjQLtNBbMsBlS0c91EgsDjJzvZUFgj5-tP4VA0VoHZPIGgV_DLRGKt-BqG-DqC5LhpsdMWEFjhVkTBpQ"
}
Unprocessable Entity. You may have specified invalid parameters.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
A list of errors
{
"errors": [
{
"type": "string",
"code": "string",
"message": "string",
"attribute": "string",
"url": "string"
}
]
}