The app backend uses this callback to monitor changes to group information (including the group name, group introduction, group notification and profile photo) in real time, including recording the changes of group information in real time (for example, recording a log or synchronizing the changes to other systems).
Group information includes basic group information and group-specific custom fields.
Currently, this callback may be triggered when the group name, group introduction, group notification, or profile photo URL is modified. This callback is not triggered when other basic group information is modified.
The callback is triggered after basic group information is modified.
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.CallbackAfterGroupInfoChanged. |
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.CallbackAfterGroupInfoChanged", // Callback command
"GroupId" : "@TGS#2J4SZEAEL",
"Type": "Public", // Group type
"Operator_Account": "leckie", // Operator
"Notification": "NewNotification" // Modified group announcement
}
Field | Type | Description |
---|---|---|
CallbackCommand | String | The callback command. |
GroupId | String | The ID of the group whose information is modified. |
Type | String | The type of the group whose information is modified, such as Public. For details, see Group Types. |
Operator_Account | String | The UserID of the operator. |
Name | String | The changed group name. |
Introduction | String | The modified group introduction. |
Notification | String | The modified group announcement. |
FaceUrl | String | The changed group profile photo URL. |
After recording group information changes, the app backend sends a callback response packet.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0 // Ignore the result in the response
}
Field | Type | Attribute | Description |
---|---|---|---|
ActionStatus | String | Required | The request processing result. OK: succeeded. FAIL: failed. |
ErrorCode | Integer | Required | The error code. The 0 value indicates that the result in the response is ignored. |
ErrorInfo | String | Required | Error information. |
Was this page helpful?