logo
In-app Chat
Powered Byspreading
On this page

Callback on call invitation accepted


Overview

After the callee accepts the call invitation, the business server can receive the callback on the call invitation accepted by the In-app Chat Server to determine the success of the call invitation acceptance request.

Callback description

  • Request method: POST.
Note
  • The callback data needs to be decoded by UrlDecode.
  • When using the POST request method to pass parameters:
    • The parameters in the body can be directly passed in the JsonObject format, without the need to serialize them into a string format.
    • In the headers, set "Content-type" to "application/json".
  • Request endpoint: The corresponding callback endpoint in the ZEGOCLOUD Admin Console

  • Protocol: HTTPS/HTTP. HTTPS is recommended.

Callback parameters

ParameterTypeDescription
appidStringThe unique identifier of the App.
eventStringThe callback event. The return value of this callback is call_accept.
nonceStringA random number.
signatureStringThe verification string. For details, see Authenticating server-to-server callbacks.
timestampIntThe current server time in Unix timestamp format.
call_idStringThe call invitation ID.
user_idStringThe user ID accepting the call invitation.
extend_dataStringAdditional Information.
Note

We recommend that you convert some parameters to Int for logical processing. The relevant fields include appid and nonce.

Sample code

Untitled
{
    "appid": "1",
    "event": "call_accept",
    "nonce": "350176",
    "signature": "signature",
    "timestamp": 1499676978,
    "call_id": "3501761173612493269",
    "user_id": "abc",
    "extend_data": "extendData"
}
1
Copied!

Return codes

A status code of 2XX (such as 200) indicates success, and other responses indicate failure.

Callback retry policy

If the ZEGOCLOUD server does not receive a response, or the HTTP status code received by the ZEGOCLOUD server is not 2xx (such as 200), it will retry with intervals of 2s, 4s, 8s, 16s, and 32s respectively. If the retry still fails after an interval of 32s, it will no longer retry.

Previous

Call invitation canceled

Next

Call invitation rejected