tencent cloud

Tencent Real-Time Communication

Webhook After Record Changed

Download
Modo Foco
Tamanho da Fonte
Última atualização: 2026-08-12 16:56:37

Feature Description

The App backend uses this callback to monitor real-time changes in the status of cloud recording tasks.

Notes

To enable this callback, configure the callback URL via the REST API and activate the corresponding protocol switch. For setup details, refer to the Callback Configuration Setup documentation.
The callback is sent from the TRTC backend to the App backend using an HTTP POST request.
Upon receiving a callback, the App backend must verify that the SDKAppID parameter in the request URL matches its own SDKAppID.

Possible Scenarios Triggering This Callback

Triggered by changes in cloud recording task status.

Callback Trigger Timing

The callback is sent immediately after the status of a cloud recording task changes.

API Description

Request URL Example

The example below uses the App's configured callback URL: https://www.example.com.
Example:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform

Request Parameter Description

Parameter
Description
https
The request protocol is HTTPS, and the request method is POST.
www.example.com
Callback URL.
SdkAppid
SDKAppID assigned when the application is created in the TRTC Console.
CallbackCommand
Fixed value: Call.CallbackAfterRecordChanged.
contenttype
Fixed value: json.
ClientIP
Client IP address, format: 127.0.0.1.
OptPlatform
Client platform. For parameter definitions, see Third-Party Callback Overview for OptPlatform.

Sample Request and Parameter Description

{
"CallId": "f6273604-3806-4abb-bc7e-090cd9208ee6",
"Callback": {
"EventGroupId": 3,
"EventType": 301,
"CallbackTs": 1774425607091,
"EventInfo": {
"RoomId": "1280586498",
"EventTs": 1774425607,
"UserId": "callkit_1500099430_record_1280586498",
"TaskId": "-nHuqHlU7islZCDCjMne7HY2TJoU1NbbDkHjVoK-yqHu8ZWQndibQJtEhvB6ShqolkmNmnxz7AE.",
"Payload": {
"Status": 0
},
"EventMsTs": 1774425607077
},
"KitType": 2
},
"CallbackCommand": "Call.CallbackAfterRecordChanged",
"EventTime": 1774425607149
}

Request Field Description

Field Name
Type
Description
CallbackCommand
String
Callback command.
EventTime
Number
Timestamp (in milliseconds) when the event was triggered.
CallId
String
Call ID.
Callback
JsonObject
Detailed event information.
EventGroupId
Number
Event group ID. Cloud recording uses 3; page recording uses 8.
EventType
Number
Event type for callback notification.
CallbackTs
Number
Unix timestamp (in milliseconds) when the callback server sent the request to your server.
EventInfo
JSON Object
Event details. For more information, see Cloud Recording Callback EventInfo.

Response Example

After processing the callback, the App backend returns a response packet.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0
}

Response Field Description

Field
Type
Attribute
Description
ActionStatus
String
Required
Result of the request. "OK" indicates success, "FAIL" indicates failure.
ErrorInfo
String
Required
Error message. It is empty if the request is successful.
ErrorCode
Integer
Required
Error code. 0 means the response result is ignored and subsequent processing continues.

Reference

Ajuda e Suporte

Esta página foi útil?

comentários