Skip to main content

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.

tip

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:

FieldTypeRequiredDescription
typeNumberYCallback type. 1: Moderation started; 2: Moderation ended; 3: Moderation status exception; 4: Moderation result callback
codeNumberYStatus code of the moderation task
appKeyStringYAppKey associated with the moderation task
roomIdStringYRoom ID of the current moderation task
userIdStringYUser ID of the current RTC stream
sceneStringNscene field passed when initiating the moderation task. If not provided manually, defaults to (video: VIDEO_LIVE, audio: LIVE_ROOM)
sessionIdStringYSession ID of the current RTC stream
dataObjectNBusiness-related parameters for the moderation task; currently includes role identifiers
contentObjectYDetails 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):

    FieldTypeDescription
    timestampNumberEvent timestamp
    streamIdStringModeration stream ID
    mediaTypeNumberMedia type selected during moderation setup: 0 (audio), 1 (video)
    errorMessageStringError message if the moderation task fails
  • When type = 4 (moderation result callback or policy violation feedback):

    FieldTypeDescription
    streamIdstringStream with detected violations
    requestIdstringModeration task ID
    contentTypenumberMedia type: 1 (image), 2 (audio)
    riskLevelnumberSeverity: 1 (PASS), 2 (REVIEW), 3 (REJECT)
    riskTypenumberViolation policy type. See Violation Types below.
    riskTimelongTimestamp of the violating video frame (absolute time) or audio segment start time
    contentUrlstringURL (HTTP/HTTPS) of the screenshot or audio clip
    descstringDetailed description of the violation
    matchTextstringDetected text in audio
    matchedItemstringMatched sensitive word
    matchedListstringList of matched sensitive words
    • Violation Types (riskType)

      riskTypeDescription
      0Normal
      100Politics
      200Pornography
      210Audio abuse / Image sensuality
      250Audio moaning
      300Advertising
      310Image QR code
      320Image watermark
      400Image violence/terrorism
      500Image violation
      510Image inappropriate scene
      700Blocklist
      710Image allowlist
      800Image high-risk account
      900Custom

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"
}
}