Skip to main content

Notification events

When you set up a server to receive webhook, notifications, Agora notifies your server of the following Cloud Transcoding events:

Event TypeEvent NameDescription
110cloud_transcoder_startedCloud transcoder has started successfully
111cloud_transcoder_stoppedCloud transcoder has been destroyed
112cloud_transcoder_statusCloud transcoder runtime state has changed
113cloud_transcoder_updatedCloud transcoder configuration has been updated

Common payload structure

All cloud transcoding webhook events share this structure:

  • taskId: String. Cloud transcoding task ID.
  • instanceId: String. Instance ID from your Create request.
  • sequence: Number. Event sequence number.
  • sendts: Number. Timestamp when event was sent (Unix milliseconds).
  • serviceScene: String. Service identifier, always "rtsc/cloud-transcoder".
  • details: JSON Object. Event-specific details (varies by event type).

110 cloud_transcoder_started

When you successfully call Create to create a Cloud Transcoder task, your server receives this event notification.

Sample payload:


_37
{
_37
"taskId":"1234",
_37
"instanceId":"123",
_37
"sequence":123,
_37
"sendts":1656573243385,
_37
"serviceScene":"rtsc/cloud-transcoder",
_37
"details":{
_37
"event":"cloud_transcoder_started",
_37
"state":"Transcoder success",
_37
"createTs":1658112464000,
_37
"transcoder":{
_37
"inputs":[
_37
{
_37
"rtcChannel":"test01",
_37
"rtcUid":123,
_37
"audio":true,
_37
"video":false
_37
},
_37
{
_37
"rtcChannel":"test01",
_37
"rtcUid":456,
_37
"audio":true,
_37
"video":true
_37
}
_37
],
_37
"outputs":[
_37
{
_37
"rtcChannel":"test01",
_37
"rtcUid":1000,
_37
"audio":true,
_37
"video":true
_37
}
_37
],
_37
"userConfigDetail":"{XXXX}"
_37
}
_37
}
_37
}

Payload parameters:

  • event: String. Callback event type. For this event, it's "cloud_transcoder_started", indicating successful creation of a cloud transcoder.
  • state: String. Cloud transcoding status. For this event, it's "Transcoder success", indicating successful creation and start of cloud transcoding.
  • createTs: Number. Unix timestamp (seconds) when the cloud transcoder was created.
  • transcoder: JSON Object. Input and output configuration of the cloud transcoder.
  • inputs: JSON Array. Audio/video input source configuration.
    • rtcChannel: String. RTC channel name for the audio/video input source.
    • rtcUid: Number. UID corresponding to the audio/video input source.
    • audio: Boolean. Whether audio input source exists (true: has audio input, false: no audio input).
    • video: Boolean. Whether video input source exists (true: has video input, false: no video input).
  • outputs: JSON Array. Audio/video output configuration.
    • rtcChannel: String. RTC channel name for the output audio/video.
    • rtcUid: Number. UID corresponding to the output audio/video.
    • audio: Boolean. Whether audio output exists (true: has audio output, false: no audio output).
    • video: Boolean. Whether video output exists (true: has video output, false: no video output).
  • userConfigDetail: String. The cloudTranscoder.config value from the Create request.

111 cloud_transcoder_stopped

This event is sent when the Cloud Transcoder is destroyed, either manually or due to an error.

Sample payload:


_13
{
_13
"taskId": "1234",
_13
"instanceId": "123",
_13
"sequence": 123,
_13
"sendts": 1656573243385,
_13
"serviceScene": "rtsc/cloud-transcoder",
_13
"details": {
_13
"event": "cloud_transcoder_stopped",
_13
"stopReason": "Stop request",
_13
"createTs": 1658112464000,
_13
"updateTs": 1658112464000
_13
}
_13
}

Payload parameters:

  • event: String. Callback event type. For this event, it's "cloud_transcoder_stopped", indicating successful destruction of a cloud transcoder.
  • stopReason: String. Reason for cloud transcoding stoppage. Could be due to calling the Delete API or other exceptional reasons. You can use this field to troubleshoot abnormal cloud transcoding stops.
  • createTs: Number. Unix timestamp (seconds) when the cloud transcoder was created.
  • updateTs: Number. Unix timestamp (seconds) when the cloud transcoder was destroyed.

112 cloud_transcoder_status

This event is triggered when the Cloud Transcoder's runtime state changes after it is created.

Sample payload:


_13
{
_13
"taskId": "1234",
_13
"instanceId": "123",
_13
"sequence": 123,
_13
"sendts": 1656573243385,
_13
"serviceScene": "rtsc/cloud-transcoder",
_13
"details": {
_13
"event": "cloud_transcoder_status",
_13
"state": "running",
_13
"createTs": 1658112464000,
_13
"updateTs": 1658112464000
_13
}
_13
}

Payload parameters:

  • event: String. Callback event type. For this event, it's "cloud_transcoder_status", indicating cloud transcoder runtime status change.
  • state: String. Cloud transcoding status. Possible values:
  • "connecting": Connecting to Agora business servers.
  • "running": Operating normally, performing cloud transcoding.
  • "failed": Cloud transcoding failed.
  • createTs: Number. Unix timestamp (seconds) when the cloud transcoder was created.
  • updateTs: Number. Unix timestamp (seconds) when the cloud transcoder status was updated.

113 cloud_transcoder_updated

This event is triggered after you successfully call Update to update the Cloud Transcoder configuration.

Sample payload:


_38
{
_38
"taskId": "1234",
_38
"instanceId": "123",
_38
"sequence": 123,
_38
"sendts": 1656573243385,
_38
"serviceScene": "rtsc/cloud-transcoder",
_38
"details": {
_38
"event": "cloud_transcoder_updated",
_38
"state": "running",
_38
"createTs": 1658112464000,
_38
"updateTs": 1658112464000,
_38
"transcoder": {
_38
"inputs": [
_38
{
_38
"rtcChannel": "test01",
_38
"rtcUid": 123,
_38
"audio": true,
_38
"video": false
_38
},
_38
{
_38
"rtcChannel": "test01",
_38
"rtcUid": 456,
_38
"audio": true,
_38
"video": true
_38
}
_38
],
_38
"outputs": [
_38
{
_38
"rtcChannel": "test01",
_38
"rtcUid": 1000,
_38
"audio": true,
_38
"video": true
_38
}
_38
],
_38
"userConfigDetail": "json_string"
_38
}
_38
}
_38
}

Payload parameters:

  • event: String. Callback event type. For this event, it's "cloud_transcoder_updated", indicating cloud transcoder configuration update.
  • state: String. Cloud transcoding status. "running" means the cloud transcoder is operating normally and performing cloud transcoding.
  • createTs: Number. Unix timestamp (seconds) when the cloud transcoder was created.
  • updateTs: Number. Unix timestamp (seconds) when the cloud transcoder configuration was updated.
  • userConfigDetail: String. Configuration content from the request body (cloudTranscoder.config).
  • transcoder: JSON Object. Input and output configuration of the cloud transcoder.
  • inputs: JSON Array. Audio/video input source configuration.
    • rtcChannel: String. RTC channel name for the audio/video input source.
    • rtcUid: Number. UID corresponding to the audio/video input source.
    • audio: Boolean. Whether audio input source exists (true: has audio input, false: no audio input).
    • video: Boolean. Whether video input source exists (true: has video input, false: no video input).
  • outputs: JSON Array. Audio/video output configuration.
    • rtcChannel: String. RTC channel name for the output audio/video.
    • rtcUid: Number. UID corresponding to the output audio/video.
    • audio: Boolean. Whether audio output exists (true: has audio output, false: no audio output).
    • video: Boolean. Whether video output exists (true: has video output, false: no video output).