logo
In-app Chat
ZIMAudio
On this page

Callback on call invitation during a call


Description

Call invitation during a call refers to the behavior of a user in a call inviting another user to join the call. When a user in a call invites another user to join the call in the client, the business backend will receive the callback on call invitation during a call from the ZIM server to obtain the details of the invitation.

Usage scenario: When a user in a call invites another user to join the call, the business backend will receive the callback on call invitation during a call from the ZIM server to confirm whether the invitation is successful.

Callback description

  • Request method: POST.
Note

The callback data format is JSON, and you need to perform UrlDecode decoding on it.

  • Request URL: Configure the callback URL in the ZEGOCLOUD 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_invite.
timestampIntThe current server time in Unix timestamp format.
nonceStringA random number.
signatureStringThe verification string. For details, see Authenticating server-to-server callbacks.
call_idStringThe call ID.
user_idsArray of StringThe list of user IDs of the users who have been invited successfully.
Warning
Does not include users who have been invited but have not accepted the invitation.
inviterStringThe user who invited the other user.
invite_timeIntThe time when the invitation was sent. The current server time in Unix timestamp format. Unit: milliseconds.
Note

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

Sample code

{
    "appid": "1",
    "event": "call_invite",
    "nonce": "350176",
    "signature": "signature",
    "timestamp": 1499676978,
    "call_id": "3501761173612493269",
    "user_ids": ["abc","def"],
    "inviter": "aaa",
    "invite_time": 1499676978000
}

Return codes

If an HTTP status code 2XX (for example, 200) is returned, the callback succeeded. Otherwise, the callback failed.

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 timed out

Next

Authenticating server-to-server callbacks

On this page

Back to top