GoChat
  • Overview
  • Demo App
  • SDK Integration
  • Client-Side Implementation
  • GoChat Cloud Service
  • Server APIs
  • Error codes
  • Documentation
  • GoChat
  • Server APIs
  • Update User Settings

Update User Settings

Last updated:2022-03-22 13:07

1 Description

Sets a room member as a listener or changes a room member's microphone status.

Rate limit: 10 requests / second.

2 Request Method and Endpoint

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

3 Request Parameters

Parameter Type Required Example Description
uid Int32 Yes 171171717 User ID.
room_id String Yes "11717" Room ID.
target_uid Int32 Yes 171171718 Target user ID.
mic Int32 No 1

Microphone status:

  • 1: Off
  • 2: On
on_stage Int32 No 1 Set a room member as a listener.
1: set as listener.
type Int32 Yes 1

Operation type:

  • 1: Change microphone status
  • 2: Set as listener

4 Request Example

{
    "uid": 9999,
    "room_id": "46466",
    "target_uid": 888,
    "mic": 1,
    "on_stage": 1,
    "type": 1
}

5 Response Parameters

None.

6 Response Example

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

7 Return Codes

Return Code Description
80001 Incorrect parameter.
80012 The user is offline.
80002 The room does not exist.
80011 The user is not in the room.
Page Directory