SDKAppID parameter in the request URL matches your own SDKAppID.https://www.example.com.https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform
Parameter | Description |
https | The request protocol is HTTPS. The request method is POST. |
www.example.com | Callback URL. |
SdkAppid | SDKAppID assigned when you create your application in the TRTC Console. |
CallbackCommand | Fixed value: Call.CallbackAfterRecordChanged. |
contenttype | Fixed value: json. |
ClientIP | Client IP address. Example format: 127.0.0.1. |
OptPlatform | Client platform. For possible values, see the OptPlatform parameter description in Third-Party Callback Overview. |
{"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}
Field Name | Type | Description |
CallbackCommand | String | Callback command. |
EventTime | Number | Timestamp (milliseconds) when event triggered. |
CallId | String | Call ID. |
Callback | JsonObject | Detailed event information. |
Field Name | Type | Description |
EVENT_TYPE_CLOUD_RECORDING_RECORDER_START | Cloud recording module started. | |
EVENT_TYPE_CLOUD_RECORDING_VOD_COMMIT | Cloud recording VOD task finished uploading media resources. Callback occurs when Cloud VOD is selected or when auto-recording to COS is enabled via the console (callback includes VOD index info after the recording file ends; subscribe to this event type for notifications). | |
EVENT_TYPE_CLOUD_RECORDING_VOD_STOP | Cloud recording VOD task ended. Callback occurs only when Cloud VOD is selected. |
Field Name | Type | Description |
RoomId | String/Number | Room name (type matches client room number type) |
EventTs | Number | Unix timestamp (seconds) for event occurrence (not recommended; use EventMsTs instead) |
EventMsTs | Number | Unix timestamp (milliseconds) for event occurrence |
UserId | String | Recording Bot user ID |
TaskId | String | Recording ID; unique for each cloud recording task |
Payload | JsonObject | Payload structure varies by event type |
EVENT_TYPE_CLOUD_RECORDING_RECORDER_START), Payload definition:Field Name | Type | Description |
Status | Number | 0: Recording module started successfully. 1: Failed to start recording module. |
{"EventGroupId": 3,"EventType": 301,"CallbackTs": 1622186275913,"EventInfo": {"RoomId": "635055","EventTs": "1622186275","EventMsTs": 1622186275757,"UserId": "user1","TaskId": "-m9-bVVU7id***K-m928oZWQndiborbEWH3zY-lIXlprc-gQvQE","Payload": {"Status": 0}}}
EVENT_TYPE_CLOUD_RECORDING_VOD_COMMIT), Payload definition:Field Name | Type | Description |
Status | Number | 0: Recording file uploaded to VOD platform successfully. 1: Recording file remains on server or backup storage. 2: Recording file upload to VOD failed. |
UserId | String | User ID associated with the recording file (empty if recording mode is mixed stream). |
TrackType | String | audio: audio only / video: video only / audio_video: audio and video. |
MediaId | String | Stream identifier: main for main stream (camera), aux for substream (screen sharing), mix for mixed stream recording. |
FileId | String | Unique ID of the recording file on the VOD platform. |
VideoUrl | String | Playback URL of the recording file on the VOD platform. |
CacheFile | String | MP4/HLS file name corresponding to the recording file. |
StartTimeStamp | Number | UNIX timestamp (milliseconds) when the recording file started. |
EndTimeStamp | Number | UNIX timestamp (milliseconds) when the recording file ended. |
Errmsg | String | Error message if status is not 0. |
{"EventGroupId": 3,"EventType": 311,"CallbackTs": 1622191965320,"EventInfo": {"RoomId": "20015","EventTs": 1622191965,"EventMsTs": 1622186275757,"UserId": "user1","TaskId": "-m9-bVVU7id***K-m928oZWQndiborbEWH3zY-lIXlprc-gQvQE","Payload": {"Status": 0,"TencentVod": {"UserId": "user2","TrackType": "audio_video","MediaId": "main","FileId": "5145403691953718116","VideoUrl": "http://example***/f0.mp4","CacheFile": "1400704311_635055__UserId_s_dHVmdGpk__UserId_e_main.mp4","StartTimeStamp": 1622186279153,"EndTimeStamp": 1622186282153}}}}
{"EventGroupId": 3,"EventType": 311,"CallbackTs": 1622191965320,"EventInfo": {"RoomId": "20015","EventTs": 1622191965,"EventMsTs": 1622186275757,"UserId": "user1","TaskId": "-m9-bVVU7id***K-m928oZWQndiborbEWH3zY-lIXlprc-gQvQE","Payload": {"Status": 1,"Errmsg": "vod service stop","TencentVod": {"UserId": "user1","TrackType": "audio_video","CacheFile": "-m9-bVVU7id***K-m928oZWQndiborbEWH3zY-lIXlprc-gQvQE"}}}}
EVENT_TYPE_CLOUD_RECORDING_VOD_STOP), Payload definition:Field Name | Type | Description |
Status | Number | 0: VOD upload task exited normally. 1: VOD upload task exited abnormally. |
{"EventGroupId": 3,"EventType": 312,"CallbackTs": 1622191965320,"EventInfo": {"RoomId": "20015","EventTs": 1622191965,"EventMsTs": 1622186275757,"UserId": "user1","TaskId": "-m9-bVVU7id***K-m928oZWQndiborbEWH3zY-lIXlprc-gQvQE","Payload": {"Status": 0}}}
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0}
Field | Type | Attribute | Description |
ActionStatus | String | Required | Result of request processing: OK for success, FAIL for failure. |
ErrorInfo | String | Required | Error message; empty string if processing is successful. |
ErrorCode | Integer | Required | Error code; 0 means ignore the response and continue processing. |
피드백