https://console.tim.qq.com/v4/desk_http_svc/create_group?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
Parameter | Description |
v4/desk_http_svc/create_group | Request API. |
sdkappid | Assigned SDKAppID in the Chat console when creating an application. |
identifier | |
usersig | Generated signature of the App administrator account. For specific operations, see Generate UserSig. |
random | Enter a random 32-bit unsigned integer. The value ranges from 0 to 4294967295. |
contenttype | The request format has a fixed value of json. |
{"Owner_Account": "user3", // Group owner's UserId (optional)"Type": "Public", // Group type: Private/Public (required)"GroupId":"MyFirstGroup", // Custom Group ID (required)"Name": "TestGroup", // Group name (required)"Introduction": "This is group introduction", // Group introduction (optional)"Notification": "This is group notice", // Group notice (optional)"FaceUrl": "http://this.is.face.url", // Group Avatar URL (optional)"MaxMemberCount": 500, // Maximum number of group members (optional)"ApplyJoinOption": "FreeAccess", // Method of handling request to join group (optional)"MemberList": [ // Initial group member list, up to 100 (optional){"Member_Account": "user2", // Member (required)"Role": "Admin" // The identity assigned to this member, currently the only option is Admin (optional).},{"Member_Account": "@customer_service_account"}]}
Field | Type | Required | Description |
Owner_Account | String | Optional. | Group Owner ID (must be an imported account). After filling in, it will be automatically added to the group members; if left empty, the group will have no group owner. |
Type | String | Required | GroupType, including Public (stranger social group), Private (i.e., Work, work group). |
GroupId | String | Required | To make the group ID simpler and easier to remember and spread, tencent cloud support allows apps to customize group ID when creating a group via REST API. |
Name | String | Required | Group name, up to 100 bytes, using UTF-8 encoding, 1 Chinese character equals 3 bytes. |
Introduction | String | Optional. | Group introduction, up to 400 bytes, using UTF-8 encoding, 1 Chinese character equals 3 bytes. |
Notification | String | Optional. | Group notice, up to 400 bytes, using UTF-8 encoding, 1 Chinese character equals 3 bytes. |
FaceUrl | String | Optional. | Group Avatar URL, up to 500 bytes. |
MaxMemberCount | Integer | Optional. | The maximum number of group members. By default, it is the paid package upper limit. For example, it is 20 for the trial version. If you upgrade the package, you need to modify this field by modifying group basic information. |
ApplyJoinOption | String | Optional. | Method of handling request to join group. Options include FreeAccess (free joining), NeedPermission (approval required), DisableApply (group join prohibition). If not filled in, the specific default value can be seen in Differences in group joining methods. this field is valid only when creating a group that supports initiation request to join. |
InviteJoinOption | String | Optional. | Method for handling invitations to join the group, including FreeAccess (directly invite users to the group without approval and other operations), NeedPermission (requiring approval from the group admin or owner), DisableInvite (unsupported SDK invitation to join the group). This option is not supported by the AVChatRoom group type. |
AppDefinedData | Array | Optional. | Custom fields at the group dimension are not available by default. They can be configured through Chat Console. For details, see Custom Fields. |
MemberList | Array | Required | Initial group member list, up to 100; for details on member information fields, see group member profile. |
AppMemberDefinedData | Array | Optional. | Custom fields at the group member dimension are not available by default. They can be configured through Chat Console. For details, see Custom Fields. |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"GroupId": "MyFirstGroup"}
Field | Type | Description |
ActionStatus | String | Request processing result: OK indicates successful processing. FAIL: Indicates Failure |
ErrorCode | Integer | Error Code: 0: success Non-zero: failure |
ErrorInfo | String | Error message. |
GroupId | String | Group ID after successful creation |
Error Code | Description of Meaning |
10002 | Server internal error, please retry. |
10003 | Illegal Request Command Word |
10004 | Invalid parameter. Check whether the request is correct according to the error description. |
10005 | The number of members imported in the request packet exceeds 100. Reduce the number of members imported in the MemberList parameter. |
10006 | Operation frequency limit. Try to reduce the call frequency. This often occurs when the net group increase in a single day is too large or the operation of obtaining all groups in the App is too frequent. |
10007 | Insufficient operation permissions. Check the request parameters according to the error information. For example, the specified group type does not allow inviting people to the group, but MemberList is filled in the request packet. |
10008 | Illegal request. It might be that the signature information carried in the request fails to pass verification. Please try again or submit a ticket to contact technical support. |
10016 | The App backend has denied this operation through the third-party callback. Please check the returned value of your callback service "Callback before creating a group". |
10021 | The group ID has been used by others. Please select another group ID. |
10025 | The group ID has been used by yourself. Please dissolve the group or select another group ID. |
10036 | The number of created audio-video chat groups exceeds the limit. Please first dissolve part of the audio-video chat groups or refer to Pricing to purchase an upgrade. |
10037 | The group owner (Owner_Account) specified in the in-progress request has exceeded the limit of the number of groups created and joined. Please ask the group owner to exit part of the groups or refer to Pricing to purchase an upgrade. |
10038 | The number of members imported in the request packet exceeds the limit. Reduce the number of members imported in the MemberList parameter or refer to Pricing to purchase an upgrade. |
10058 | The trial version exceeds the limit of 100 groups. You need to purchase a package to increase the group creation limit. |
141001 | Failed to assign human customer service. No available customer service online. |
141002 | Internal system error, please retry. |
141004 | Illegal request parameters, please check and retry. |
Feedback