The app backend uses this callback to monitor group dismissal in real time, including recording group dismissal information in real time (for example, recording a log or synchronizing the information to other systems).
The callback is triggered after a group is dismissed.
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.CallbackAfterGroupDestroyed. |
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.CallbackAfterGroupDestroyed", // Callback command
"GroupId" : "@TGS#2J4SZEAEL",
"Type": "Public", // Group type
"Owner_Account": "leckie", // Group owner
"Name": "MyFirstGroup", // Group name
"MemberList" : [ // Members in the dismissed group
{
"Member_Account": "leckie"
},
{
"Member_Account": "peter"
},
{
"Member_Account": "bob"
}
]
}
Field | Type | Description |
---|---|---|
CallbackCommand | String | The callback command. |
GroupId | String | The ID of the dismissed group. |
Type | String | The type of the dismissed group, such as Public. For details, see Group Types. |
Owner_Account | String | The UserID of the group owner. |
MemberList | Array | The member list of the dismissed group. |
After recording group dismissal information, the app backend sends a callback response packet.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0
}
Field | Type | Attribute | Description |
---|---|---|---|
ActionStatus | String | Required | The request processing result. OK: succeeded. FAIL: failed. |
ErrorCode | Integer | Required | The error code. We recommend that you set this field to 0. This callback is used to notify users after the group is dismissed. The error code value does not affect the normal group dismissal process. |
ErrorInfo | String | Required | Error information. |
Was this page helpful?