Callback Event Reference
Callback event names, payload fields, signature and retry semantics, generated from the public callback event definitions.
event envelope
each delivery is a JSON object, fields are determined by the public API definition(schema nimeet.callbacks v1.0.0)Definition:
| Field | Type / meaning |
|---|---|
eventType | number — see events[].eventType |
noticeId | string — unique per delivery attempt batch |
notifyMs | epoch milliseconds when the event was produced |
payload | object — event specific, see events[].payload |
productId | number — 1 = RTC |
sid | string — unique session id for the event |
{
"eventType": 101,
"noticeId": "ntc_01J8Z0000000000000000000AA",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_01J8Z0000000000000000000AA",
"payload": {
"channelName": "weekly-sync",
"profile": "communication",
"ts": 1771000000
}
}full event-code table(auto-generated)
13 events; event codes are aligned with Agora channel events (101–112) and task events (201–203). Payload fields are taken item by item from the public callback event definitions.
Channel and user events
| event codes | Name | Trigger timing |
|---|---|---|
101 | channel_create | Channel created (first participant joins or room is created). |
102 | channel_destroy | Channel destroyed (room finished / last participant left and grace elapsed). |
103 | broadcaster_join | A broadcaster (host) joined a live channel. |
104 | broadcaster_leave | A broadcaster left a live channel; `reason` carries the Agora leave reason. |
105 | audience_join | An audience member joined a live channel. |
106 | audience_leave | An audience member left a live channel. |
107 | user_join | A user joined a communication channel. |
108 | user_leave | A user left a communication channel; `reason` carries the Agora leave reason. |
111 | role_to_broadcaster | A user was promoted to broadcaster/host. |
112 | role_to_audience | A user was demoted to audience. |
task and Token events
| event codes | Name | Trigger timing |
|---|---|---|
201 | recording_state_changed | Cloud recording task state changed (starting/running/stopping/stopped/failed). |
202 | streaming_state_changed | Bypass streaming task state changed (including idle-timeout expiry). |
203 | token_expiring | A token is close to its privilege expiry; `TOKEN_PRIVILEGE_WILL_EXPIRE_LEAD_SECONDS` lead time. |
event payload fields
101 channel_create
Channel created (first participant joins or room is created).
| Field | Type / value |
|---|---|
channelName | string |
profile | communication | live |
ts | epoch seconds |
{
"eventType": 101,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"profile": "…",
"ts": 1771000000
}
}102 channel_destroy
Channel destroyed (room finished / last participant left and grace elapsed).
| Field | Type / value |
|---|---|
channelName | string |
ts | epoch seconds |
{
"eventType": 102,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"ts": 1771000000
}
}103 broadcaster_join
A broadcaster (host) joined a live channel.
| Field | Type / value |
|---|---|
channelName | string |
platform | number |
ts | epoch seconds |
uid | number |
{
"eventType": 103,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"platform": 1,
"ts": 1771000000,
"uid": 10001
}
}104 broadcaster_leave
A broadcaster left a live channel; `reason` carries the Agora leave reason.
| Field | Type / value |
|---|---|
channelName | string |
reason | number |
ts | epoch seconds |
uid | number |
{
"eventType": 104,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"reason": 1,
"ts": 1771000000,
"uid": 10001
}
}105 audience_join
An audience member joined a live channel.
| Field | Type / value |
|---|---|
channelName | string |
platform | number |
ts | epoch seconds |
uid | number |
{
"eventType": 105,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"platform": 1,
"ts": 1771000000,
"uid": 10001
}
}106 audience_leave
An audience member left a live channel.
| Field | Type / value |
|---|---|
channelName | string |
reason | number |
ts | epoch seconds |
uid | number |
{
"eventType": 106,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"reason": 1,
"ts": 1771000000,
"uid": 10001
}
}107 user_join
A user joined a communication channel.
| Field | Type / value |
|---|---|
channelName | string |
platform | number |
ts | epoch seconds |
uid | number |
{
"eventType": 107,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"platform": 1,
"ts": 1771000000,
"uid": 10001
}
}108 user_leave
A user left a communication channel; `reason` carries the Agora leave reason.
| Field | Type / value |
|---|---|
channelName | string |
reason | number |
ts | epoch seconds |
uid | number |
{
"eventType": 108,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"reason": 1,
"ts": 1771000000,
"uid": 10001
}
}111 role_to_broadcaster
A user was promoted to broadcaster/host.
| Field | Type / value |
|---|---|
channelName | string |
ts | epoch seconds |
uid | number |
{
"eventType": 111,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"ts": 1771000000,
"uid": 10001
}
}112 role_to_audience
A user was demoted to audience.
| Field | Type / value |
|---|---|
channelName | string |
ts | epoch seconds |
uid | number |
{
"eventType": 112,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"ts": 1771000000,
"uid": 10001
}
}201 recording_state_changed
Cloud recording task state changed (starting/running/stopping/stopped/failed).
| Field | Type / value |
|---|---|
channelName | string |
mode | composite | individual | web |
state | string |
taskId | string |
ts | epoch seconds |
{
"eventType": 201,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"mode": "…",
"state": "running",
"taskId": "task_…",
"ts": 1771000000
}
}202 streaming_state_changed
Bypass streaming task state changed (including idle-timeout expiry).
| Field | Type / value |
|---|---|
channelName | string |
hlsUrl | string |
rtmpUrl | string |
state | string |
taskId | string |
ts | epoch seconds |
{
"eventType": 202,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"hlsUrl": "…",
"rtmpUrl": "…",
"state": "running",
"taskId": "task_…",
"ts": 1771000000
}
}203 token_expiring
A token is close to its privilege expiry; `TOKEN_PRIVILEGE_WILL_EXPIRE_LEAD_SECONDS` lead time.
| Field | Type / value |
|---|---|
channelName | string |
privilegeExpireAt | epoch seconds |
ts | epoch seconds |
uid | number |
{
"eventType": 203,
"noticeId": "ntc_…",
"notifyMs": 1771000000000,
"productId": 1,
"sid": "sid_…",
"payload": {
"channelName": "weekly-sync",
"privilegeExpireAt": 1771000000,
"ts": 1771000000,
"uid": 10001
}
}Request headers and signature
| Request headers | Description |
|---|---|
Agora-Signature | HMAC-SHA1 hex of the raw body with the endpoint secret |
Agora-Signature-V2 | HMAC-SHA256 hex of the raw body with the endpoint secret |
Content-Type | application/json |
X-Request-Id | delivery correlation id |
the receiver must useraw request-body bytesComputing the signature:deserializing before signing includes whitespace/order differences, causing validation to fail.for the full implementation of validation and replay protection see Callback integration。
Retries and success criteria
| Item | value |
|---|---|
| Maximum attempts | 9 |
| backoff sequence(seconds) | 5 / 15 / 60 / 300 / 900 / 3600 / 7200 / 21600 |
| Success criteria | HTTP 2xx |
| Idempotency key | noticeId(duplicate deliveries remain unchanged) |
non-2xx is treated as failure and enters the next backoff; after retries are exhausted, delivery records remain in the delivery log, available via the console or delivery-log endpointreplay.