Server APIs v2
  • Server APIs overview
  • Accessing Server APIs
  • Room signaling
  • Stream mixing
  • Streaming moderation
  • Streaming control
  • CDN recording
  • Server callbacks
  • Return codes
  • API testing
  • FAQ
  • Documentation
  • Server APIs v2
  • Server callbacks
  • Callback on recorded file merge complete

Callback on recorded files merged

Last updated:2022-03-22 13:07

1 Description

If the callback address is designed before calling the Merge recorded files on CDN and the CDN you use is Tencent Cloud, the callback will be triggered when the merge task is completed, and the callback will send a POST request to request the callback address.

2 Callback request

  • Request method: POST/JSON or POST/FORM (Form values need to be decoded using urldecode)

    JSON is the default format; To use FORM format, please contact us.

  • Request endpoint: Please contact ZEGO technical support to configure the callback address.

  • Transmission protocol: HTTPS

3 Callback parameters

Parameter Type Description
appid
String
App identifier.
event
String
Callback event, the return value of this callback is compose.
replay_url
String
The URL that you can replay the merged file. (within 1024 bytes)
task_id
String
Task ID, which is the same as the TaskId carried in the Data parameter in the Merge recorded files on CDN interface response.
file_id
String
File ID, which is the same as the FileId carried in the Data parameter in the response of the Search for recorded files interface.
code
String
Error Codes. 0 indicates success, other values mean failure:
  • 40000: The input parameter is invalid, please check the input parameter.
  • 60000: The source file is invalid (such as the video data is damaged), please check the source file.
  • 70000: Internal service error. Please try again.
message
String
Error message.
timestamp
String
The current time of the server, a Unix timestamp.
nonce
String
A random number.
signature
String
Signature string for authentication. For more details about the request signature, see Authenticating server-to-server callbacks.

4 Request data example

  • POST/JSON
{
    "appid": "1",
    "event": "compose",
    "replay_url": "replay_url",
    "task_id": "task_id",
    "file_id": "5285890813218549789",
    "code": "0",
    "message": "message",
    "timestamp": "1481597358",
    "nonce": "158273",
    "signature": "signature"
}
  • POST/FORM
Array
(
    [appid] => 1
    [event] => compose
    [replay_url] => replay_url
    [task_id] => task_id
    [file_id] => 5285890813218549789
    [code] => 0
    [message] => message
    [timestamp] => 1481597358
    [nonce] => 158273
    [signature] => signature
)

5 Response example

A response of an HTTP status code of 2XX (eg., 200) indicates that the request has been completed successfully; Other responses indicate a failed request.

6 Retry strategy

If the HTTP request fails (i.e., the HTTP status code is not 2XX), the ZEGO server will retry the request after 15 seconds. If the retry still fails, then no more retry will be attempted.

Page Directory