logo
In-app Chat
Powered Byspreading
On this page

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:

iOSAndroidmacOSWindows
callUserStateChangedonCallUserStateChangedcallUserStateChangedonCallUserStateChanged
WebFlutterUnity3DReact Native
callUserStateChangedonCallUserStateChangedOnCallUserStateChangedcallUserStateChanged

Request method and endpoint

  • Request method: GET
  • Request endpoint: https://zim-api.zego.im/?Action=CallReject
  • Protocol: HTTPS
  • Rate limit: 20 times/second

Request parameters

The following list only shows the request parameters for this interface and some public parameters. For a complete list of public parameters, please refer to Accessing Server APIs - Public parameters.

ParameterTypeRequiredDescription
FromUserIdStringYesThe user with this ID (registered) to reject the invitation.
CallIdStringYesThe call ID.
ExtendedDataStringNoExtended field with a maximum length of 2 KB.
Note

FromUserId only supports numbers, English characters, and '!', '#', '$', '%', '&', '(', ')', '+', '', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~'.

Sample request

Untitled
https://zim-api.zego.im/?Action=CallReject
&FromUserId=user0
&CallId=CallId
&ExtendedData=ExtendedData
&<Public parameters>
1
Copied!

Response parameters

ParameterTypeDescription
CodeNumberThe return code.
MessageStringThe description of the operation result.
RequestIdStringThe request ID.

Sample response

Untitled
{
    "Code": 0,
    "Message": "success",
    "RequestId": "343649807833778782"
}
1
Copied!

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 CodeDescriptionSolution
660000002Invalid parameter.Please check the parameters.
660300005The QPS exceeds the AppID level limit.Please try again later.
660500002The FromUserId is not registered.Register the user for ZIM service first.
660900004Failed to obtain the call information.Please check if the call exists or try again later.
660900005The call has ended and cannot be operated on.No action is required.
660900006The call invitation has timed out and cannot be operated on.No action is required.
660900008The FromUserId is not invited to the call so that the operator cannot operate on it.No action is required.

Previous

Accept a call invitation

Next

Mute notifications for conversations