提交工单
咨询集成、功能及报价等问题
Call login_room
to log in to a classroom and get the classroom settings, such as the default microphone/camera status, microphone/camera permissions, and maximum number of co-hosting members allowed, etc.
API call frequency limit: 10 times/second.
POST
/edu_room/login_room
application/json
Parameter | Type | Mandatory | Example | Description |
---|---|---|---|---|
room_id | String | Yes | "123456" | Room ID of the classroom, a string with a maximum of 9 characters and contains only digits. |
uid | Int64 | Yes | 171171717 | User ID. |
nick_name | String | Yes | "Shawn" | User nickname, up to 15 characters. |
role | Int32 | Yes | 1 | User role. Valid values:
|
room_type | Int32 | No | 2 | Room type. Valid values:
|
{
"uid":171171717,
"room_id":"123456",
"nick_name":"Shawn",
"role":2,
"room_type":2
}
Parameter | Type | Example | Description |
---|---|---|---|
room_id | String | "123456" | Room ID of the classroom. |
max_join_live_num | Int32 | 4 | Maximum number of co-hosting members (participating in live interactions) allowed. |
default_camera_state | Int32 | 2 | The default camera state. If the user's current camera status is inconsistent with this default setting, call set_user_info to change it. Valid values:
|
default_mic_state | Int32 | 2 | The default microphone state. If the user's current microphone status is inconsistent with this default setting, call set_user_info to change it. Valid values:
|
allow_turn_on_camera | Int32 | 2 | Whether students are allowed to turn on their camera by themselves. Valid values:
|
allow_turn_on_mic | Int32 | 2 | Whether students are allowed to turn on their microphone by themselves. Valid values:
|
uid | Int64 | 171171717 | User ID. |
nick_name | String | "Shawn" | User nickname. |
role | Int32 | 1 | User role. Valid values:
|
camera | Int32 | 1 | User's camera status. Valid values:
|
mic | Int32 | 1 | User's microphone status. Valid values:
|
can_share | Int32 | 2 | User sharing permission. Valid values:
|
login_time | Int64 | 1600920322511 | The time when the user logged in to the classroom, a Unix timestamp in milliseconds. |
{
"ret": {
"code": 0,
"message": "succeed"
},
"data": {
"max_join_live_num": 4,
"room_id": "123456",
"default_camera_state": 2,
"default_mic_state": 2,
"allow_turn_on_camera": 2,
"allow_turn_on_mic": 2,
"uid": 171171717,
"nick_name": "Shawn",
"role": 1,
"login_time": 1600920322511,
"camera": 1,
"mic": 1,
"can_share": 2
}
}
Return Code | Description |
---|---|
10001 | There is already a teacher in the class, you cannot join as a teacher. |
10002 | Cannot join the class because it is full. |