提交工单
咨询集成、功能及报价等问题
Creates a room.
Request method: POST
Request endpoint:
Service environment | Rate limit | Endpoint |
---|---|---|
Production | 10 requests/second | https://roomkit-edu-api.zego.im/room/create |
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
secret_id | Int64 | Yes | 12580 | The Secret ID assigned to your project by ZEGO. |
access_token | String | Yes | "CIE7hNPK6Y55DeUJBSDrInP" | The server access token obtained via the get_access_token request. |
begin_timestamp | Int64 | Yes | 1590666065838 | The start time of the room, a timestamp in milliseconds. It cannot be earlier than one hour before the current time. |
duration | Int | Yes | 120 | Room duration, in minutes. |
room_type | Int | Yes | 1 | Room Type:
You must use the Room Type associated with your Product ID, which can be viewed on the RoomKit Admin Console. |
subject | String | Yes | "The Future Of Remote Learning" | The subject of the room. |
pid | Int64 | Yes | 1 | The Product ID assigned to your project by ZEGO. |
max_attendee_count | Int | No | 10 | The maximum number of users allowed in the room. |
host | Object | is | - | The Host of the room. |
host.uid | Int64 | yes | 99900000 | User ID of the Host. |
attendees | Array of Object | No | - | The list of Attendees in the room. |
attendees.uid | Int64 | No | 99900000 | User ID of the Attendee. |
assistants | Array of Object | No | - | The list of the Assistants in the room. |
assistants.uid | Int64 | No | 99900000 | User ID of the Assistant. |
settings | Object | No | - | Room settings. If not specified, all the parameters will be set to false . |
settings.enable_host_cam | Bool | No | true | Whether to turn on the Host's camera by default. If not specified, the default is false . |
settings.enable_host_mic | Bool | No | true | Whether to turn on the Host's microphone by default. If not specified, the default is false . |
settings.enable_attendee_cam | Bool | No | true | Whether to turn on the Attendees' camera by default. If not specified, the default is false . |
settings.enable_attendee_mic | Bool | No | true | Whether to turn on the Attendees' microphone by default. If not specified, the default is false . |
settings.enable_chat | Bool | No | true | Whether to enable the text chat feature. If not specified, the default is false . |
settings.enable_raise_hand | Bool | No | true | Whether to enable the Raise Hand feature. If not specified, the default is false . |
settings.enable_attendee_share | Bool | No | true | Whether to enable the content sharing feature for Attendees. If not specified, the default is false . |
settings.enable_attendee_draw | Bool | No | true | Whether to allow Attendees to use the paintbrush. If not specified, the default is false . |
settings.enable_wait | Bool | No | true | Whether to enable the Waiting Room feature by default (only valid for meeting use cases). If not specified, the default is false . |
settings.enable_wait_setting | Bool | No | true | Whether the Waiting Room feature can be enabled when needed (only valid for meeting use cases). If not specified, the default is false . |
settings.is_auto_start | Bool | No | true | Whether to start the room automatically. If not specified, the default is false , which means the Host will need to click the Start button to start the room. |
settings.max_onstage_count | Int | No | 2 | The maximum number of users allowed on the speaker stage (only valid for Large Rooms). If not specified, the default is 2. |
settings.is_private_room | Bool | No | false | Whether it is a private room. A private room only accepts invited people and the organization's administrators. If not specified, the default is false . |
password | String | No | "12!@#" | Room password. |
{
"subject": "The Future Of Remote Learning",
"room_type": 5,
"begin_timestamp": 1610436614000,
"duration": 1433,
"password": " ",
"max_attendee_count": 1200,
"pid": 1255,
"settings": {
"enable_host_cam": true,
"enable_host_mic": true,
"enable_attendee_cam": true,
"enable_attendee_mic": true,
"enable_chat": true,
"enable_raise_hand": true,
"enable_attendee_share": true,
"enable_attendee_draw": true,
"is_auto_start": true,
"max_onstage_count": 2,
"is_private_room": false
},
"host": {
"uid": 100062263
},
"attendees": [
{
"uid": 100062263
}
],
"assistants": [
{
"uid": 100062164
},
{
"uid": 100062167
}
],
"secret_id": 2587762184,
"access_token": "kaVmfcZR5P8hpqqMmAWXCGYkxf2AgpQjo3NPfBg-mVHYfYUkukaXWN-wekbdVRDlYEp4mbvq9tonqDEw2nNsiw=="
}
Parameter | Type | Example | Description |
---|---|---|---|
ret | Object | - | The returned status of the request. |
ret.code | Int | 0 | The returned code. |
ret.message | String | "succeed" | The returned message. |
ret.version | String | "1.0.0" | Version number. |
data | Object | - | The returned data of the request. |
data.room_id | String | "1200001356" | Room ID, which is globally unique. The room_id that appears in the RoomKit documents refers to this field. |
data.room_number | String | "673153816" | Room number, a 9-digit number for easy memory. It is not globally unique. |
data.begin_timestamp | Int64 | 1606184383000 | The start time of the room. |
{
"ret": {
"code": 0,
"message": "succeed",
"version": "1.0.0"
},
"data": {
"room_id": "1200001356",
"room_number": "673153816",
"begin_timestamp": 1606184383000
}
}