Skip to main content

Create Group

Brief Description

  • Create a group, need to specify the group owner, group members (including the group owner) cannot be less than 3 people.

Request Method

  • post

Request URL

  • {API_ADDRESS}/group/create_group
Header NameExample ValueOptionalTypeDescription
operationID1646445464564RequiredstringUsed for global link tracking, timestamp is recommended, independent in each request
tokeneyJhbxxxx3XsRequiredstringAdmin token

Request Parameter 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
memberUserIDsOptionalarrayGroup member list
adminUserIDsOptionalarrayGroup admin list
ownerUserIDRequiredstringGroup owner
groupInfoRequiredobjectGroup Info list
groupInfo.groupIDOptionalstringGroup ID
groupInfo.groupNameRequiredstringGroup name
groupInfo.notificationOptionalstringGroup notice
groupInfo.introductionOptionalstringGroup introduction
groupInfo.faceURLOptionalstringGroup avatar URL
groupInfo.exOptionalstringGroup extension field
groupInfo.groupTypeRequiredintGroup type, fixed as 2.
groupInfo.needVerificationOptionalintWhether verifying is needed to join group
groupInfo.lookMemberInfoOptionalintWhether able to view other member's info
groupInfo.applyMemberFriendOptionalintWhether group member is allowed to add friend

Success Return 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": ""
}
}
}

Parameter Description for Success Return Example

Parameter NameTypeDescription
errCodeintError code, 0 means successful
errMsgstringBrief error message, empty
errDlterrDltDetailed error message, empty
dataobjectGeneric data object, specific structure is below
groupInfoobjectGroup Info list

Failure Return Example

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

Parameter Description for Failure Return Example

Parameter NameTypeDescription
errCodeintError code, specifically check the global error code document
errMsgstringBrief error message
errDlterrDltDetailed error message