Large Classes
  • Overview
  • Demo App
  • Sample Codes
  • SDK Integration
  • Teacher-Side Implementation
  • Student-Side Implementation
  • GoClass Backend Service
  • Error Codes
  • Documentation
  • Large Classes
  • GoClass Backend Service
  • Set User Attributes

Set User Attributes

Last updated:2022-03-22 13:06

1 Description

Call set_user_info to modify the camera and microphone status and sharing permission of a user in a classroom.

API call frequency limit: 10 times/second.

Only teachers have the authority to change the attributes of other users in a classroom.

2 API Prototype

  • Request method: POST
  • Request endpoint: /edu_room/set_user_info
  • Transmission protocol: application/json

3 Request Parameters

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.
target_uid Int64 Yes 171171717 The target user ID. If it is the same as the user ID, it means to change the user's own data.
camera Int32 No 1 Target user's camera status.

Valid values:
  • 1: Off
  • 2: On
mic Int32 No 1 Target user's microphone status.

Valid values:
  • 1: Off
  • 2: On
can_share Int32 No 1 Target user's sharing permission.

Valid values:
  • 1: Off
  • 2: On
room_type Int32 No 2 Room type.

Valid values:
  • 1: Small class
  • 2: Large class
Defaults to "Small class" if not specified.

4 Request Example

{
  "uid":171171717,
  "room_id":"123456",
  "room_type": 2,
  "target_uid":171171717,
  "mic":2,
  "camera":2
}

5 Response Parameters

None.

6 Response Example

{
  "ret": {
    "code": 0,
    "message": "succeed"
  }
}

7 Return Codes

Return Code Description
10003 No authority to change other user's attributes.
10004 The target user is not in the classroom.
10005 Please log in to the classroom first.
10007 The number of co-hosting members has reached the limit.
Page Directory