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
  • Get Online Member List

Get Online Member List

Last updated:2022-03-22 13:06

1 Description

Call get_attendee_list to obtain the information of all teacher and students currently in the classroom, including user role, user ID, user nickname, user's camera and microphone status, user's sharing permission, etc.

API call frequency limit: 10 times/second.

2 API Prototype

  • Request method: POST
  • Request endpoint: /edu_room/get_attendee_list
  • 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.
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
}

5 Response Parameters

Parameter Type Example Description
room_id String "123456" Room ID of the classroom.
seq Int64 1 The sequence number of the online member list, which should be cached locally on the client to detect any data out-of-sync issues.
attendee_list Object - Online member list.

The data structure of attendee_list is as follows:

Parameter Type Example Description
uid Int64 171171717 User ID.
nick_name String "Shawn" User nickname.
role Int32 1 User role.

Valid values:
  • 1: Teacher
  • 2: Student
camera Int32 1 User's camera status.

Valid values:
  • 1: Off
  • 2: On
mic Int32 1 User's microphone status.

Valid values:
  • 1: Off
  • 2: On
can_share Int32 2 User's sharing permission.

Valid values:
  • 1: Off
  • 2: On
login_time Int64 1600928701534 The time when the user logged in to the classroom, a Unix timestamp in milliseconds.
join_live_time Int64 1600928726313 The time when the user joined live interactions (i.e., became a co-host), a Unix timestamp in milliseconds.

6 Response Example

{
  "ret": {
    "code": 0,
    "message": "succeed"
  },
  "data": {
    "attendee_list": [
      {
        "uid": 171171717,
        "nick_name": "Shawn",
        "role": 1,
        "login_time": 1600928701534,
        "join_live_time": 1600928726313,
        "camera": 2,
        "mic": 2,
        "can_share": 2
      }
    ],
    "seq": 1,
    "room_id": "123456"
  }
}

7 Return Codes

Return Code Description
10005 Please log in to the classroom first.
10006 The classroom does not exist.
Page Directory