API Overview
ZEGOCLOUD cloud communication product server API has been upgraded to version v2, with the new API interface documentation being more standardized and comprehensive.
Server API v2 supports global nearest access, unified Authentication method, unified parameter style, and common error codes, providing developers with a simple and fast user experience.
-
Developers can refer to the Quick Start documentation to quickly complete an API call.
-
For development and debugging, you can also refer to How to Debug Server API Online to quickly debug the corresponding interface on the documentation page.
-
The API interfaces in this document are the latest server API v2 interfaces. Future feature additions will be updated here. To provide a better experience for developers, ZEGOCLOUD recommends using the latest API v2 interfaces.
-
The old version of the API interface is no longer maintained and new features will not be added. For old version interface documentation, please refer to Server API.
Room Signaling Interfaces
| Interface Name | Interface Function |
|---|---|
| SendBroadcastMessage | Send broadcast message |
| SendBarrageMessage | Send barrage message |
| SendCustomCommand | Send custom command |
| DescribeUserNum | Get room user count |
| DescribeUsers | Query User status |
| DescribeUserList | Get room User list |
| AddStream | Add room Stream |
| DeleteStream | Delete room Stream |
| DescribeSimpleStreamList | Get simple Stream list |
| CloseRoom | Close Room |
| KickoutUser | Kick User out of Room |
| SetForbidUserRule | Set User ban rule |
| DescribeForbidUserRules | Query User ban rule |
| DelForbidUserRule | Delete User ban rule |
| SetForbidStreamRule | Set room audio/video Stream ban rule |
| DescribeForbidStreamRules | Query room audio/video Stream ban rule |
| DelForbidStreamRule | Delete room audio/video Stream ban rule |
Stream Mixing and Transcoding Interfaces
| Interface Name | Interface Function |
|---|---|
| StartMix | Start Stream Mixing |
| StopMix | Stop Stream Mixing |
| GetMixTaskInfo | Query Stream Mixing task info |
| StartAutoMix | Start automatic Stream Mixing |
| StopAutoMix | Stop automatic Stream Mixing |
| StartCloudTranscode | Start single-stream transcoding |
| StopCloudTranscode | Stop single-stream transcoding |
Media Service Interfaces
| Interface Name | Interface Function |
|---|---|
| ForbidCDNLiveStream | Forbid CDN Publish stream |
| QueryForbidCDNLiveStream | Query list of URLs forbidden from Publishing to CDN |
| ResumeCDNLiveStream | Resume CDN Publish stream |
| ForbidRTCStream | Forbid RTC Publish stream |
| ResumeRTCStream | Resume RTC Publish stream |
| ForbidRTCStreams | Batch forbid RTC Publish stream |
| ResumeRTCStreams | Batch resume RTC Publish stream |
| CreatCDNTransferRule | Start CDN relay Publish stream |
| DeleteCDNTransferRule | Stop CDN relay Publish stream |
| ClearCDNTransferRule | Clear CDN relay Publish stream |
| RTMPDispatchV2 | RTMP Publish/Play stream dispatch |
Media File Interfaces
| Interface Name | Interface Function |
|---|---|
| StartCDNRecord | Start CDN Recording |
| StopCDNRecord | Stop CDN Recording |
| SearchMedia | Search media info |
| DeleteMedia | Delete media file |
| MergeMedia | Merge media files |
| DescribeMediaTask | Query media file task |
| TranscodeMedia | Start on-demand transcoding |
Audio/Video Stream Moderation Interfaces
| Interface Name | Interface Function |
|---|---|
| StartCensorAudioV2 | Start audio Stream moderation |
| StopCensorAudioV2 | Stop audio Stream moderation |
| StartCensorVideoV2 | Start video Stream moderation |
| StopCensorVideoV2 | Stop video Stream moderation |
| GenerateIdentifyToken | Audio/video Stream moderation Authentication Token |
Scene Service Interfaces
| Interface Name | Interface Function |
|---|---|
| SetSceneTemplate | Scene template configuration |
Callback Description
| Callback Name | Callback Description |
|---|---|
| room_create | Room created Callback |
| room_close | Room destroyed Callback |
| room_login | User logged into Room Callback |
| room_logout | User logged out of Room Callback |
| stream_create | Stream created Callback |
| stream_close | Stream destroyed Callback |
| mix_start | Stream Mixing started Callback |
| mix_stop | Stream Mixing stopped Callback |
| transcode_start | Single-stream transcoding started Callback |
| transcode_stop | Single-stream transcoding stopped Callback |
| record | Recording file generated Callback |
| compose | Media file merge completed Callback |
| procedure | On-demand transcoding completed Callback |
| censor_audio_v2_result | Audio Stream moderation result Callback |
| censor_audio_v2_status | Audio Stream moderation task status Callback |
| censor_video_v2_audio_result | Video Stream audio moderation result Callback |
| censor_video_v2_img_result | Video Stream image moderation result Callback |
| censor_video_v2_audio_status | Video Stream audio moderation status Callback |
| censor_video_v2_img_status | Video Stream image moderation status Callback |
