SendBarrageMessage
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 SDK | LiveRoom SDK | |
|---|---|---|
| iOS/macOS | onIMRecvBarrageMessage | onRecvBigRoomMessage |
| Android | onIMRecvBarrageMessage | onRecvBigRoomMessage |
| Windows | onIMRecvBarrageMessage | OnRecvBigRoomMessage |
| Web | IMRecvBarrageMessage | onRecvBigRoomMessage |
- 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
Possible values: [SendBarrageMessage]
API Prototype Parameters
https://rtc-api.zego.im?Action=SendBarrageMessage
💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.
💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.
💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.
💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.
Possible values: [2.0]
Default value: 2.0
💡Public parameter. Signature version number.
Room ID.
Sender User ID.
Sender username (corresponds one-to-one with UserId).
Possible values: [1, 2]
Message category. 1: System message. 2: Chat message.
Possible values: <= 1024 characters
Message content, length cannot exceed 1024 bytes. When using, URL encoding (UrlEncode) must be performed on the content.
Responses
- 200
- application/json
