The app backend system uses this callback to monitor group member addition messages in real time. This callback can notify the app backend system that new members are added to the group so that the app can perform necessary data synchronization.
In the following example, the callback URL configured for 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.CallbackAfterNewMemberJoin. |
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 values, see the OptPlatform parameter in Third-Party Callback Overview: Callback Protocols. |
{
"CallbackCommand": "Group.CallbackAfterNewMemberJoin", // Callback command
"GroupId" : "@TGS#2J4SZEAEL",
"Type": "Public", // Group type
"JoinType": "Apply", // Method for joining a group: Apply (apply to join the group) or Invited (invited to join the group)
"Operator_Account": "leckie", // Operator member
"NewMemberList": [ // New member list
{
"Member_Account": "jared"
},
{
"Member_Account": "tommy"
}
]
}
Field | Type | Description |
---|---|---|
CallbackCommand | String | The callback command. |
GroupId | String | The ID of the group into which other users are to be added. |
Type | String | The type of the group to be created. For details, see Group Types. The group type can be Public. |
JoinType | String | The method for joining a group: Apply (apply to join the group) or Invited (invited to join the group). |
Operator_Account | String | The UserID of the request operator. |
NewMemberList | Array | The list of new members’ UserID s. |
The app backend system returns the response packet after synchronizing data.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0 // Ignore the response result
}
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 response can be ignored. |
ErrorInfo | String | Required | Error information. |
Was this page helpful?