GoChat
  • Overview
  • Demo App
  • SDK Integration
  • Client-Side Implementation
  • GoChat Cloud Service
  • Server APIs
  • Error codes
  • Documentation
  • GoChat
  • Server APIs
  • List Room Members

List Room Members

Last updated:2022-03-22 13:07

1 Description

Gets the list of all members in a chat room.

Rate limit: 10 requests / second.

2 Request Method and Endpoint

  • Request method: POST
  • Request endpoint: /chat_room/get_attendee_list
  • Content-Type: application/json

3 Request Parameters

Parameter Type Required Example Description
room_id String Yes "33444" Room ID.
uid Int32 Yes 171171717 User ID.
page Int32 Yes 2 Page index.
page_size Int32 Yes 10 Number of entries per page.

4 Request Example

{
  "uid":171171717,
  "room_id":"123456",
  "page": 2,
  "page_size": 10
}

5 Response Parameters

Parameter Type Example Description
attendee_list_seq Int32 2935 Sequence number of the room member list.
gb_personal_state_seq Int32 0 Sequence number of personal state.
room_id String "123456" Room ID.
attendee_list Object - Room member list.

The data structure of attendee_list is as follows:

Parameter Type Example Description
room_id String "200113279" Room ID.
uid Int32 171171717 User ID.
nick_name String "Shawn" User's Nickname.
avatar String "1" Index of the user's profile picture.
role Int32 1

User role:

  • 1: Listener
  • 2: Guest Speaker
  • 3: Host

login_timestamp Int64 1608186550647 Login time.
mic Int32 1

Microphone status:

  • 1: Off
  • 2: On

raise_hand Int32 1

"Raise Hand" status:

  • 1: Hand not raised
  • 2: Hand raised

raise_hand_timestamp Int64 1608186550647 Time hand raised.
onstage_state Int32 2

On-stage status:

  • 1: Not on the stage (i.e., not participating in the chat)
  • 2: On the stage (i.e., participating in the chat)

onstage_timestamp Int64 1608186550647 Time user joined the chat.

6 Response Example

{
    "ret": {
        "code": 0,
        "message": ""
    },
    "data": {
        "attendee_list_seq": 2935,
        "gb_personal_state_seq": 0,
        "room_id": "200114129",
        "attendee_list": [
            {
                "room_id": "200114129",
                "uid": 100007259,
                "nick_name": "100007259",
                "avatar": "1",
                "role": 2,
                "login_timestamp": 1609211408597,
                "mic": 1,
                "raise_hand": 1,
                "raise_hand_timestamp": 1609211408597,
                "onstage_state": 1,
                "onstage_timestamp": 1609211408597
            }
        ]
    }
}

7 Return Codes

Return Code Description
80001 Incorrect parameter.
80012 The user is offline.
Page Directory