logo
Video Call
Server API
Stream Mixing and Transcoding APIs
On this page

SendBarrageMessage

GET

https://rtc-api.zego.im/

Use this interface to push barrage messages in a Room, generally used for scenarios with large volumes of message sending and receiving where message reliability is not required.

Clients receive messages using ZEGOCLOUD Express SDK callback interfaces:

ZegoExpress SDKLiveRoom SDK
iOS/macOSonIMRecvBarrageMessageonRecvBigRoomMessage
AndroidonIMRecvBarrageMessageonRecvBigRoomMessage
WindowsonIMRecvBarrageMessageOnRecvBigRoomMessage
WebIMRecvBarrageMessageonRecvBigRoomMessage
Rate Limit
All Rooms under the same AppID: 100 times/second (test environment: 10 times/second)
Notice
  • When sending messages through a certain UserId on the server, clients using the same UserId will not receive that message, meaning the sender cannot receive their own sent messages.
  • If developers need all users in the Room to receive messages, when calling this interface, a UserId other than that of the Room user should be passed in.
  • The UserId used does not need to log in to the Room to send messages directly.

Request

Query Parameters

    Action stringrequired

    Possible values: [SendBarrageMessage]

    API Prototype Parameters

    https://rtc-api.zego.im?Action=SendBarrageMessage

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.

    Timestamp int64required

    💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.

    Signature stringrequired

    💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    RoomId stringrequired

    Room ID.

    UserId stringrequired

    Sender User ID.

    UserName string

    Sender username (corresponds one-to-one with UserId).

    MessageCategory uint32required

    Possible values: [1, 2]

    Message category. 1: System message. 2: Chat message.

    MessageContent stringrequired

    Possible values: <= 1024 characters

    Message content, length cannot exceed 1024 bytes. When using, URL encoding (UrlEncode) must be performed on the content.

Responses

Operation successful
Schema
    Code int32

    Return code. The following only lists some return codes related to the API business logic. For complete return codes, please refer to Global Return Codes.

    Return CodeDescriptionSuggested Handling
    1008Message content MessageContent is empty.Please retry, or contact ZEGOCLOUD technical support for assistance.
    50012Message length exceeds limit.Please check if the parameter length exceeds the limit.
    Message string

    Description of the operation result.

    RequestId string

    Request ID.

    Data object
    MessageId string

    Message ID.

Previous

SendBroadcastMessage

Next

SendCustomCommand

On this page

Back to top