The app backend can use this callback to monitor users who quit groups in real time, including recording users’ quitting information (for example, recording a log or synchronizing the quitting information to other systems).
The callback is triggered after a user quits a group or is removed from the group by the group owner or admin.
In the following example, the callback URL configured in the app is https://www.example.com
.
Example:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform
Parameter | Description |
---|---|
https | The request protocol is HTTPS, and the request method is POST. |
www.example.com | The callback URL. |
SdkAppid | The SDKAppID assigned by the IM console when an app is created. |
CallbackCommand | The value is fixed to Group.CallbackAfterMemberExit. |
contenttype | The value is fixed to JSON. |
ClientIP | The client IP address, whose format is similar to 127.0.0.1. |
OptPlatform | The client platform. For details on the possible values, see the OptPlatform parameter in Third-Party Callback Overview: Callback Protocols. |
{
"CallbackCommand": "Group.CallbackAfterMemberExit", // The callback command.
"GroupId": "@TGS#2J4SZEAEL", // The group ID.
"Type": "Public", // The group type.
"ExitType": "Kicked", // The member quitting method. Possible values are Kicked and Quit.
"Operator_Account": "leckie", // The operator.
"ExitMemberList": [ // The list of quit members.
{
"Member_Account": "jared"
},
{
"Member_Account": "tommy"
}
]
}
Field | Type | Description |
---|---|---|
CallbackCommand | String | The callback command. |
GroupId | String | The ID of the group that generates group messages. |
Type | String | The type of the group that generates group messages, such as Public. For details, see Group Types. |
ExitType | String | The quitting method of the member. Kicked: the member is removed from the group by the group owner. Quit: the member voluntarily quits the group. |
Operator_Account | String | The UserID of the member who quits the group. |
ExitMemberList | Array | The list of quit members. |
The app backend returns the response packet after synchronizing data.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0 // The result in the response is ignored.
}
Field | Type | Attribute | Description |
---|---|---|---|
ActionStatus | String | Required | The request processing result. OK: succeeded. FAIL: failed. |
ErrorCode | Integer | Required | The error code. 0: ignore the result in the response. |
ErrorInfo | String | Required | Error information. |
Was this page helpful?