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:
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 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.
Parameter | Type | Required | Description |
---|---|---|---|
FromUserId | String | Yes | The user with this ID (registered) to accept 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 the following special characters: '!', '#', '$', '%', '&', '(', ')', '+', '', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~'.
Sample request
https://zim-api.zego.im/?Action=CallAccept
&FromUserId=user0
&CallId=CallId
&ExtendedData=ExtendedData
&<Public parameters>
Response parameters
Parameter | Type | Description |
---|---|---|
Code | Number | Return code. |
Message | String | Operation result description. |
RequestId | String | 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. |