logo
In-app Chat
Powered Byspreading
On this page

Accept a call invitation


Overview

This interface is used to accept a call invitation for a user.

After the user accepts the invitation and enters the call, other users who are in the call will receive notifications of the user's status 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=CallAccept
  • 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 accept the invitation.
CallIdStringYesThe call ID.
ExtendedDataStringNoExtended field with a maximum length of 2 KB.
Note

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

Sample request

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

Response parameters

ParameterTypeDescription
CodeNumberReturn code.
MessageStringOperation result description.
RequestIdStringRequest 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

Send a call invitation

Next

Reject a call invitation