Reject a call invitation
Overview
This interface is used to reject a call invitation for a user.
After the user rejects the invitation, other users who are in the call will receive a notification of the user's state change through the following ZIM SDK callback interface:
| iOS | Android | macOS | Windows |
|---|---|---|---|
| callUserStateChanged | onCallUserStateChanged | callUserStateChanged | onCallUserStateChanged |
| Web | Flutter | Unity3D | React Native |
| callUserStateChanged | onCallUserStateChanged | OnCallUserStateChanged | callUserStateChanged |
Request method and endpoint
- Request method: GET
- Request URL:
https://zim-api.zego.im/?Action=CallReject - Protocol: HTTPS
- QPS limit: 20 requests/second
Request parameters
The following list only shows the request parameters for this interface and some common parameters. For a complete list of common parameters, please refer to Accessing Server APIs - Common parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
| FromUserId | String | Yes | The user with this ID (registered) to reject the invitation. |
| CallId | String | Yes | The call ID. |
| ExtendedData | String | No | Extended field with a maximum length of 2 KB. |
FromUserId only supports numbers, English characters, and '!', '#', '$', '%', '&', '(', ')', '+', '', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~'.
Sample request
https://zim-api.zego.im/?Action=CallReject
&FromUserId=user0
&CallId=CallId
&ExtendedData=ExtendedData
&<Common parameters>Response parameters
| Parameter | Type | Description |
|---|---|---|
| Code | Number | The return code. |
| Message | String | The description of the operation result. |
| RequestId | String | The request ID. |
Sample response
{
"Code": 0,
"Message": "success",
"RequestId": "343649807833778782"
}Return codes
The following list only shows the return codes related to the business logic of the interface. For a complete list of return codes, please refer to Return codes.
| Return Code | Description | Solution |
|---|---|---|
| 660000002 | Invalid parameter. | Please check the parameters. |
| 660300005 | The QPS exceeds the AppID level limit. | Please try again later. |
| 660500002 | The FromUserId is not registered. | Register the user for ZIM service first. |
| 660900004 | Failed to obtain the call information. | Please check if the call exists or try again later. |
| 660900005 | The call has ended and cannot be operated on. | No action is required. |
| 660900006 | The call invitation has timed out and cannot be operated on. | No action is required. |
| 660900008 | The FromUserId is not invited to the call so that the operator cannot operate on it. | No action is required. |

