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.
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
| Parameter | Type | Description |
|---|---|---|
| appid | String | The unique identifier of the App. |
| event | String | The callback event. The return value of this callback is call_invite. |
| timestamp | Int | The current server time in Unix timestamp format. |
| nonce | String | A random number. |
| signature | String | The verification string. For details, see Authenticating server-to-server callbacks. |
| call_id | String | The call ID. |
| user_ids | Array of String | The 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. |
| inviter | String | The user who invited the other user. |
| invite_time | Int | The time when the invitation was sent. The current server time in Unix timestamp format. Unit: milliseconds. |
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.
