Skip to main content

CDN Push Status Callback

RC supports real-time notifications to your server when Low-Latency Live Streaming is relayed to third-party CDNs.

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 this address 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 Parameters

The HTTP request body uses application/json format and contains a JSON object with the following structure:

Field NameTypeDescription
timestampNumberUnix timestamp in milliseconds since January 1, 1970.
typeNumberStatus type:
1: CDN relay started;
2: CDN relay ended;
3: CDN relay configuration updated;
4: CDN relay failed
appKeyStringCurrent AppKey in use
sessionIdStringCurrent live streaming session ID
roomIdStringCurrent live streaming room ID
pushUrlStringCDN relay URL
userIdStringHost user ID who initiated the CDN relay
output.videoResoulationStringVideo resolution (width × height)
stateCodeNumberStatus code

Callback Request Example

POST /any-url-path HTTP/1.1
Host: your.app.server
Content-Type: application/json

{
"timestamp":1593483553055,
"type":2,
"stateCode":10000,
"appKey":"qf3d5gbjq962h",
"roomId":"iOS-MUJERjYwNTk5MTkyMERCMTFDQkRGODUwODIwNEM0RUI-1593483530019",
"sessionId":"AtqSLHUE_29wd2o6QKM4u7",
"userId":"A2BDE07D-5273-487A-8997-99BF25D06DFE",
"pushUrl":"rtmp://rongcloud.net/seal/AtqSLo6QKM4u7?auth_key=1593487130ace2de7f67c1111",
"output":{
"videoResoulation":"240x320"
}
}

Responding to Callbacks

Your server must return 200 OK to acknowledge successful receipt.