Skip to main content

Create Group

Brief Description

  • Creates a new group.

Request Method

  • post

Request URL

  • {API_ADDRESS}/group/create_group
Header NameExample ValueOptionalTypeDescription
operationID1646445464564RequiredstringUsed for global trace tracking. It is recommended to use a timestamp, unique for each request
tokeneyJhbxxxx3XsRequiredstringAdmin token

Request Parameters Example

{
"memberUserIDs": [
"1225441072"
],
"adminUserIDs": [
"2065939257"
],
"ownerUserID": "1054527962",
"groupInfo": {
"groupID": "xadxwr24",
"groupName": "yourg group name",
"notification": "notification",
"introduction": "introduction",
"faceURL": "faceURL url",
"ex": "ex",
"groupType": 2,
"needVerification": 0,
"lookMemberInfo": 0,
"applyMemberFriend": 0
}
}
Field NameOptionalTypeDescription
memberUserIDsOptionalarrayList of group members' user IDs
adminUserIDsOptionalarrayList of group admin user IDs
ownerUserIDRequiredstringGroup owner ID
groupInfoRequiredobjectGroup information
groupInfo.groupIDOptionalstringGroup ID
groupInfo.groupNameRequiredstringGroup name
groupInfo.notificationOptionalstringGroup announcement
groupInfo.introductionOptionalstringGroup introduction
groupInfo.faceURLOptionalstringGroup avatar URL
groupInfo.exOptionalstringGroup extension field
groupInfo.groupTypeRequiredintGroup type, fixed as 2
groupInfo.needVerificationOptionalintWhether joining the group requires verification
groupInfo.lookMemberInfoOptionalintWhether group members can view other members' information
groupInfo.applyMemberFriendOptionalintWhether group members are allowed to add friends

Success Response Example

{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {
"groupInfo": {
"groupID": "xadxwr24",
"groupName": "yourg group name",
"notification": "notification",
"introduction": "introduction",
"faceURL": "faceURL url",
"ownerUserID": "199975690",
"createTime": 1679656402377,
"memberCount": 4,
"ex": "ex",
"status": 0,
"creatorUserID": "",
"groupType": 2,
"needVerification": 0,
"lookMemberInfo": 0,
"applyMemberFriend": 0,
"notificationUpdateTime": 0,
"notificationUserID": ""
}
}
}

Success Response Parameters Description

Parameter NameTypeDescription
errCodeintError code, 0 indicates success
errMsgstringBrief error message, empty if none
errDlterrDltDetailed error information, empty if none
dataobjectGeneral data object, see structure below
groupInfoobjectGroup information

Failure Response Example

{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": [1004]RecordNotFoundError"
}

Failure Response Parameters Description

Parameter NameTypeDescription
errCodeintError code, refer to global error code documentation
errMsgstringBrief error message
errDlterrDltDetailed error information