Audit Status Callback
RC RTC Moderation Service supports real-time notification of policy-violating events detected by moderation tasks and moderation status updates to your application server.
Enable the Service
Content Moderation is a paid value-added service. Log in to the Console and enable RTC Moderation on the IM & RTC Moderation page.
Before using content moderation status callbacks, ensure you have enabled RTC Moderation in the Console and completed the required configurations.
Ensure you have configured a callback URL for RTC Moderation results. Once configured, all status changes for RTC Moderation in your app's rooms will trigger HTTP requests to your server in real time. The callback URL must be publicly accessible. Configurations take effect within 15 minutes.
Callback Method
POST: <your-receiving-server-url>
Data format: application/json
The callback URL <your-receiving-server-url>
is the configured receiving address for your App Key and service in the Console. Ensure the URL is accessible. If your network has IP restrictions, configure the IP allowlist to receive server callbacks properly.
To verify data authenticity and ensure the request originates from RC Server, each request includes a signature. For callback signature rules, see Server Callback.
Callback Body Parameters
The HTTP request body uses application/json
format and contains a JSON object with the following structure:
Field | Type | Required | Description |
---|---|---|---|
type | Number | Y | Callback type. 1 : Moderation started; 2 : Moderation ended; 3 : Moderation status exception; 4 : Moderation result callback |
code | Number | Y | Status code of the moderation task |
appKey | String | Y | AppKey associated with the moderation task |
roomId | String | Y | Room ID of the current moderation task |
userId | String | Y | User ID of the current RTC stream |
scene | String | N | scene field passed when initiating the moderation task. If not provided manually, defaults to (video: VIDEO_LIVE , audio: LIVE_ROOM ) |
sessionId | String | Y | Session ID of the current RTC stream |
data | Object | N | Business-related parameters for the moderation task; currently includes role identifiers |
content | Object | Y | Details of the moderation event. Format depends on the type field. See Content Field Details below. |
Content Field Details
-
When type = 1, 2, 3 (i.e., moderation started, ended, or status exception):
Field Type Description timestamp Number Event timestamp streamId String Moderation stream ID mediaType Number Media type selected during moderation setup: 0
(audio),1
(video)errorMessage String Error message if the moderation task fails -
When type = 4 (moderation result callback or policy violation feedback):
Field Type Description streamId string Stream with detected violations requestId string Moderation task ID contentType number Media type: 1
(image),2
(audio)riskLevel number Severity: 1
(PASS),2
(REVIEW),3
(REJECT)riskType number Violation policy type. See Violation Types below. riskTime long Timestamp of the violating video frame (absolute time) or audio segment start time contentUrl string URL (HTTP/HTTPS) of the screenshot or audio clip desc string Detailed description of the violation matchText string Detected text in audio matchedItem string Matched sensitive word matchedList string List of matched sensitive words -
Violation Types (
riskType
)riskType Description 0 Normal 100 Politics 200 Pornography 210 Audio abuse / Image sensuality 250 Audio moaning 300 Advertising 310 Image QR code 320 Image watermark 400 Image violence/terrorism 500 Image violation 510 Image inappropriate scene 700 Blocklist 710 Image allowlist 800 Image high-risk account 900 Custom
-
Callback Request Example
Example JSON request body:
{
"type": 2,
"roomId": "112314",
"sessionId": "UkPy0sWFp57zX2KgSemAw9",
"userId": "6688_8889_and",
"appKey": "qf3d5gbjq962h",
"scene": "VIDEO_LIVE"
"code": 200,
"content": {
"errorMessage": "Success",
"mediaType": 1,
"pullURL": "rtmp://ccensor-rtmp.RongCloudRTC_video_622120743647",
"streamId": "6688_8889_and_RongCloudRTC",
"timestamp": 1606121033890
},
"data": {
"role": "RC_CALLInvitee"
}
}