Server APIs v2
  • Server APIs overview
  • Accessing Server APIs
  • Room signaling
  • Stream mixing
  • Streaming moderation
  • Streaming control
  • Cloud recording
  • Server callbacks
  • Return codes
  • API testing

Get simple streamlist

Last updated:2022-03-22 13:07

1 Description

Obtain the flow list information in the room. After obtaining the flow list, compare it with the business background flow list to prevent "Zoombombing". You can also obtain the unique stream ID in the room through this interface, and make a callback for Stream Mixing sound waves when using a third-party player.

2 Request method and endpoint

  • Request method: GET
  • Request address: https://rtc-api.zego.im/?Action=DescribeSimpleStreamList
  • Transmission protocol: HTTPS
  • Rate limit:
    • Single room: 1 time/10 seconds
    • All rooms under the same AppID: 50 times/sec

3 Request parameters

Listed below are the parameters specific to this request and part of the public request parameters. For the complete list of public request parameters, see Server APIs public request parameters.

Parameter Type Required Description
RoomId
String
Yes
Room ID.

4 Request example

https://rtc-api.zego.im/?Action=DescribeSimpleStreamList
&RoomId=123
&<public Request Parameters>

5 Response parameters

Parameter Type Description
Code
Number
Return code.
Message
String
A Description of the operation result.
RequestId
String
Request ID.
Data
Object
Response data.
└ StreamList
Array of Object
List of streams.
  └ StreamId
String
Stream ID.
  └ UserId
String
Username.
  └ UserName
String
User nickname.
  └ CreateTime
Number
Creation time.
  └ StreamNumberId
Number
Room unique stream ID.

6 Response Example

{
    "Code": 0,
    "Message": "success",
    "RequestId": "5885338326725063742",
    "Data": {
        "StreamList": [{
          "StreamId": "stream_demo",
          "UserId": "user_demo",
          "UserName": "user_name_demo",
          "CreateTime": 1642045110123,
          "StreamNumberId": 10
        }]
    }
}

7 Return codes

Listed below are the return codes related to this API. For the complete list of return codes, see Return codes.

Return code Possible cause and solution
104 The room does not exist. (the detection logic is the same as the return codes 5024 and 50001.) Please check the RoomId.
206 The rate limit (requests per second) has exceeded the limit. Please adjust the frequency of your requests or contact ZEGOCLOUD technical support.
5018 Room status does not match. Please try again later.
5024 The room does not exist. (the detection logic is the same as the return codes 104 and 5001.) Please check the RoomId.
50001 The room does not exist. (the detection logic is the same as the return codes 104 and 5024.)
  • When there are no users in a room, the room will be automatically destroyed by the server.
  • When there is only one user in a room and the user exits or is kicked out of the room, the room will be automatically destroyed by the server.
  • When a room's heartbeat request times out by 100 seconds, the room will be destroyed by the server.
50002 User does not exist. Please check the UserId.
50003 Failed to query the user's online info. Please check whether the user is online based on the UserId.
50004 Failed to read the user info. Please check whether the user is online based on the UserId.
50009 Moderation failed. Please try again later or contact ZEGOCLOUD technical support.
50011 The number of recipients of the custom message has exceeded the limit.
50012 The length of the custom message has exceeded the limit.
50013 Failed to send custom messages. Please contact ZEGOCLOUD technical support.