This API is used by the app admin to modify the basic information of a specified group.
Group Type ID | Is this RESTful API Supported? |
---|---|
Private | Yes. Same as Work (work group for friends) in the new version. |
Public | Yes. |
ChatRoom | Yes. Same as Meeting (temporary meeting group) in the new version. |
AVChatRoom | Yes. |
These are the 4 built-in group types in IM. For detailed information, see the Group System.
https://console.tim.qq.com/v4/group_open_http_svc/modify_group_base_info?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
The list below contains only the parameters commonly used when calling this API and their descriptions. For more parameters, see RESTful API Overview.
Parameter | Description |
---|---|
v4/group_open_http_svc/modify_group_base_info | Request API |
sdkappid | SDKAppID assigned by the IM console when the application is created |
identifier | The value must be the app admin account. For more information, see App Admins. |
usersig | Signature generated by the app admin account. For details, see Generating UserSig. |
random | A random 32-bit unsigned integer ranging from 0 to 4294967295 |
The maximum calling frequency is 200 calls per second.
Modify basic group information
Modify basic group information, such as the group name and group announcement.
{
"GroupId": "@TGS#1NVTZEAE4", // Group whose basic information you want to modify (required)
"Name": "NewName", // Group name (optional)
"Introduction": "NewIntroduction", // Group introduction (optional)
"Notification": "NewNotification", // Group announcement (optional)
"FaceUrl": "http://this.is.new.face.url", // Group profile photo (optional)
"MaxMemberNum": 500, // Maximum number of group members (optional)
"ApplyJoinOption": "NeedPermission", // Method for applying to join the group (optional)
"ShutUpAllMember": "On" // Mutes all members (optional). "On": enable, "Off": disable
}
Set custom group information
Set a group’s custom field information. By default, custom information is not available and needs to be enabled. For details, see the description table for request packet fields.
{
"GroupId": "@TGS#1NVTZEAE4", // Group whose basic information you want to modify (required)
"AppDefinedData": [ // Custom field (optional)
{
"Key": "GroupTestData1", // Custom field key to be modified
"Value": "NewData" // New value of the custom field
}
]
}
Delete custom group information
Delete a group’s custom field information that you have set.
{
"GroupId": "@TGS#1NVTZEAE4", // Group whose basic information you want to modify (required)
"AppDefinedData": [ // Custom field (optional)
{
"Key": "GroupTestData2",
"Value": "" // If this parameter is empty, it indicates that the custom field is to be deleted.
}
]
}
ALL IN ONE
{
"GroupId": "@TGS#2J4SZEAEL", // Group whose basic information you want to modify (required)
"Name": "NewName", // Group name (optional)
"Introduction": "NewIntroduction", // Group introduction (optional)
"Notification": "NewNotification", // Group announcement (optional)
"FaceUrl": "http://this.is.new.face.url", // Group profile photo (optional)
"MaxMemberNum": 500, // Maximum number of group members (optional)
"ApplyJoinOption": "NeedPermission", // Method for applying to join the group (optional)
"ShutUpAllMember": "On", // Mutes all members (optional). "On": enable, "Off": disable
"AppDefinedData": [ // Custom field (optional)
{
"Key": "GroupTestData1", // Custom field key to be modified
"Value": "NewData" // New value of the custom field
},
{
"Key": "GroupTestData2",
"Value": "" // If this parameter is empty, it indicates that the custom field is to be deleted.
}
]
}
Field | Type | Required | Description |
---|---|---|---|
GroupId | String | Required | ID of the group whose basic information you want to modify |
Name | String | Optional | Group name, whose maximum length is 30 bytes |
Introduction | String | Optional | Group introduction, whose maximum length is 240 bytes |
Notification | String | Optional | Group announcement, whose maximum length is 300 bytes |
FaceUrl | String | Optional | URL of the group profile photo, whose maximum length is 100 bytes |
MaxMemberNum | Integer | Optional | Maximum number of group members |
ApplyJoinOption | String | Optional | Method for handling requests to join the group. Valid values: FreeAccess, NeedPermission, and DisableApply |
AppDefinedData | Array | Optional | By default, this field is not available. To learn how to enable group-level custom fields, see Custom Fields. |
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0
}
Field | Type | Description |
---|---|---|
ActionStatus | String | The processing result of the request. OK: succeeded. FAIL: failed. |
ErrorCode | Integer | Error code. 0 indicates that the request was successful, and any non-zero value indicates that the request failed. |
ErrorInfo | String | Detailed error information |
Unless a network error (such as error 502) occurs, the returned HTTP status code for this API is always 200. The specific error code and details can be found in the response packet fields such as ErrorCode
and ErrorInfo
.
For public error codes (60000 to 79999), see Error Codes.
The list below contains error codes specific to this API:
Error Code | Description |
---|---|
10002 | An internal server error occurred. Please try again. |
10003 | The request command word is invalid. |
10004 | A parameter is invalid. Check the error description and troubleshoot the issue. |
10026 | The command word of the SDKAppID request is disabled. Please contact our technical support. |
10007 | The operator does not have the necessary operation permissions. Check whether the operator is the app admin or whether the operator has the permission to modify the fields in the request. |
10010 | The group does not exist, or once existed but has been disbanded. |
10015 | The group ID is invalid. Be sure to use the correct group ID. |
80001 | The modified group member information failed text content filtering. Check whether the modified group member information contains sensitive words. |
Use the online debugging tool for RESTful APIs to debug this API.
Deleting group members (v4/group_open_http_svc/delete_group_member)
Was this page helpful?