このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。

グループメンバープロファイル変更後のコールバック

Feature Overview

The app backend can real-time view the changes in group member information (group member identity, group card) through this callback. The app backend can perform operations such as data synchronization based on it.

Notes

To enable the callback, you must configure a callback URL and toggle on the corresponding protocol switch. For detailed configuration methods, see Third-party Callback Configuration document.
During this callback, the Chat backend initiates an HTTP POST request to the app backend.
After the callback request is received, the app backend must check whether the SDKAppID contained in the request URL is consistent with its own SDKAppID.
For other security-related matters, please refer to Introduction to Third-party Callback - Security Considerations.

Scenarios That May Trigger This Callback

An App user modifies group member information through the client.
An App administrator modifies group member profiles through RESTful APIs.

Callback Trigger Time

After you successfully modify group member profiles.

API Description

Sample Request URL

In the subsequent example, the callback URL configured within the app is https://www.example.com. Example:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform

Request Parameters

Parameter
Description
https
The request protocol is HTTPS, and the request method is POST
www.example.com
Callback URL
SdkAppid
SDKAppID allocated by the Chat console at the time of Application creation
CallbackCommand
Fixed value: Group.CallbackAfterMemberFieldChanged
contenttype
Fixed value: JSON
ClientIP
Client IP, for example: 127.0.0.1
OptPlatform
Client Platform, see the Webhook Overview - Callback Protocol for the meaning of the OptPlatform parameter

Sample Request Packets

{
"CallbackCommand": "Group.CallbackAfterMemberFieldChanged", // Callback after Group Member Profile Change
"GroupId": "@TGS#xxxx", // Group ID
"Type": "Community", // Group type
"Operator_Account": "admin", // Operating User ID
"Member_Account": "123456", // User ID
"Role": "Admin", // Changed Member Status
"NameCard": "jacky", // Changed Group Card Name
"EventTime":"1670574414123"// Event trigger timestamp in milliseconds
}


Request Packet Fields

Field
Type
Description
CallbackCommand
String
Callback command
GroupId
String
Operating Group ID
Type
String
Group Type Group Type Introduction, e.g., Public
Operator_Account
String
UserID of the Operator Initiating the Change Request
Member_Account
String
Change Member UserID
Role
String
Changed Member Status, Admin/Member for setting/canceling administrator respectively
NameCard
String
Changed Group Card Name
EventTime
Integer
Event trigger timestamp in milliseconds

Response Packet Example

Following data synchronization, the app backend dispatches a callback response packet.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0 // Ignore callback result
}

Response Packet Field Description

Field
Type
Attribute
Description
ActionStatus
String
Required
Processed Request Result:
OK: Indicates successful processing
FAIL: Indicates failure
ErrorCode
Integer
Required
Error Code, entering 0 here means to ignore the response result
ErrorInfo
String
Required
Error message

Reference