- 不管是添加40人以内还是以上都用此接口
- cause填写邀请进群的理由
Content-Type:application/json
X-GEWE-TOKEN: 后台获取
参数名 | 必填 | 数据类型 | 说明 |
---|---|---|---|
appid | 是 | string | 设备id |
group_id | 是 | string | 群id |
cause | 是 | string | 邀请进群的理由 |
to_wxid | 是 | array | 被邀请人wxid |
参数名 | 数据类型 | 说明 |
---|---|---|
ret | number | 0:成功 |
msg | string | 反馈信息 |
data | object |
{
"appid": "wxid_p3r6ddddvqcl22",
"cause": "通过一下",
"group_id": "34876481524@chatroom",
"to_wxid": [
"wxid_phyyedw9xap22"
]
}
{
"ret": 0,
"msg": "success",
"data": {
"baseResponse": {
"ret": 0,
"errMsg": {
"string": "Everything is OK"
}
},
"MemberCount": 1, #被邀请人数量
"MemberList": [ #被邀请人详情
{
"MemberName": {
"string": "wxid_4bxxxxxxxxxxx22"
},
"MemberStatus": 0,
"NickName": { #昵称
"string": "xahya"
},
"PYInitial": {
"string": "XAHYA"
},
"QuanPin": {
"string": "xahya"
},
"Sex": 1, #性别
"Remark": {
"string": "xahya" #群里的昵称
},
"RemarkPyinitial": {
"string": "XAHYA"
},
"RemarkQuanPin": {
"string": "xahya"
},
"ContactType": 0,
"Province": "Jiangsu", #省份
"City": "Xuzhou", #城市
"Signature": "123", #个性签名
"PersonalCard": 1, #个人名片
"VerifyFlag": 0,
"Country": "CN"
}
]
}
}
{
"ret": 0,
"msg": "success",
"data": {
"baseResponse": {
"ret": -2,
"errMsg": {
"string": "\n1 \n \n \n30 \n \n4 \n0 \n0 \n \n \n0 \n \n"
}
},
"MemberCount": 0
}
}
- 支持企微群
- 查询出来的信息可能存在偏差
Content-Type:application/json
X-GEWE-TOKEN: 后台获取
参数名 | 必填 | 数据类型 | 说明 |
---|---|---|---|
appid | 是 | string | 设备id |
group_id | 是 | string | 群id |
参数名 | 数据类型 | 说明 |
---|---|---|
ret | number | 0:成功 |
msg | string | 反馈信息 |
data | object |
{
"appid": "wxid_p3r6ddddvqcl22",
"group_id": "34876481524@chatroom",
}
{
"ret": 0,
"msg": "success",
"data": {
"BaseResponse": {
"ret": 0,
"errMsg": {}
},
"ChatroomUserName": "34876481524@chatroom", #群wxid
"ServerVersion": 700000008,
"NewChatroomData": { #群成员信息
"MemberCount": 3, #群成员人数
"ChatRoomMember": [
{
"UserName": "wxid_vr2kwrzbg0q622", #微信号
"NickName": "尤某人", #昵称
"BigHeadImgUrl": "https://wx.qlppaz9QKlFfsjzQ/0", #大号头像
"SmallHeadImgUrl": "https://wx.qlogo.cn/mzQ/132", #小号头像
"ChatroomMemberFlag": 2049,
"InviterUserName": "wxid_p3r6ddddvqcl22" 邀请人wxid
},
{
"UserName": "wxid_p3r6ddddvqcl22",
"NickName": "Z",
"BigHeadImgUrl": "https://wx.qlogo.cn/mmhead/ver_1/pBuLcF8bHgbiaSQozgotYOSfgOBpgpD0WQPDTt7iaox7Cga7ibvfqYxnbpGoCkicicPRYEiaI3esA9ZJ8xiceMHZ1qNkhIYm9c3uI2JDiaeuZKXqGxQ/0",
"SmallHeadImgUrl": "https://wx.qlogo.cn/mmhead/ver_1/pBuLcF8bHgbiaSQozgotYOSfgOBpgpD0WQPDTt7iaox7Cga7ibvfqYxnbpGoCkicicPRYEiaI3esA9ZJ8xiceMHZ1qNkhIYm9c3uI2JDiaeuZKXqGxQ/132",
"ChatroomMemberFlag": 1
},
{
"UserName": "wxid_4bxxxxxxxxxxx22",
"NickName": "xahya",
"BigHeadImgUrl": "https://wx.qlogo.cn/mmhead/ver_1/GvJjOhWuoibaPk2wuib8UuFYPdRgdTFKXh1gUvVts5UrWGmmew8iccBGymJibm1ydlGBSZ3orWkrf56fbWAH3Ds5XN2t1dUG11DQQtEEGSqdvkM/0",
"SmallHeadImgUrl": "https://wx.qlogo.cn/mmhead/ver_1/GvJjOhWuoibaPk2wuib8UuFYPdRgdTFKXh1gUvVts5UrWGmmew8iccBGymJibm1ydlGBSZ3orWkrf56fbWAH3Ds5XN2t1dUG11DQQtEEGSqdvkM/132",
"ChatroomMemberFlag": 1,
"InviterUserName": "wxid_p3r6ddddvqcl22"
}
],
}
}
}
{
"ret": 0,
"msg": "success",
"data": {
"BaseResponse": {
"ret": -2,
"errMsg": {
"string": ""
}
}
}
}
- 将群组保存到通讯录,方便下次能从通讯录中获取
Content-Type:application/json
X-GEWE-TOKEN: 后台获取
参数名 | 必填 | 数据类型 | 说明 |
---|---|---|---|
appid | 是 | string | 设备id |
group_id | 是 | string | 群id |
value | 是 | number | 3添加 2移除 |
参数名 | 数据类型 | 说明 |
---|---|---|
ret | number | 0:成功 |
msg | string | 反馈信息 |
data | object |
{
"appid": "wxid_p3r6ddddvqcl22",
"group_id": "34876481524@chatroom",
"value": 3,
}
{
"ret": 0,
"msg": "success",
"data": {
"ret": 0,
"oplogRet": {
"count": 1,
"ret": "AA=="
}
}
}
{
"ret": -1,
"msg_err": "[{{appidw}}]设备不存在或已离线"
}
- 注意不要频繁添加
- 注意内容,避免风控
Content-Type:application/json
X-GEWE-TOKEN: 后台获取
参数名 | 必填 | 数据类型 | 说明 |
---|---|---|---|
appid | 是 | string | 设备id |
content | 是 | string | 添加好友验证信息 |
group_id | 是 | string | 群id |
to_wxid | 是 | string | 群用户wxid |
参数名 | 数据类型 | 说明 |
---|---|---|
ret | number | 0:成功 |
msg | string | 反馈信息 |
data | object | |
data.v1 | string | 好友凭证 |
{
"appid": "wxid_p3r6ddddvqcl22",
"content": "jj",
"group_id": "34876481524@chatroom",
"to_wxid": "wxid_4bxxxxxxxxxxx22"
}
{
"ret": 0,
"msg": "success",
"data": {
"BaseResponse": {
"ret": 0,
"errMsg": {}
},
"v1": "v3_020b3826fd030100000000004f7920779e51ed000000501ea9a3dba12f95f6b60a0536a1adb6ab682894369b025a10e371ac2d27b824de65d74f5c0cf2708093d87013902b40a661568c0d2e0043e9308ffd3ab9ab63caa45065152775b510e30df23d@stranger"
}
}
{
"ret": -1,
"msg": "fail",
"msg_err": "无法正常获取[Ticket]请检查要添加的群组成员是否已存在好友关系",
"data": null
}
- 返回的信息和查询联系人信息基本一致
- 每次查询不得超过20位群成员
Content-Type:application/json
X-GEWE-TOKEN: 后台获取
参数名 | 必填 | 数据类型 | 说明 |
---|---|---|---|
appid | 是 | string | 设备id |
content | 是 | string | 添加好友验证信息 |
group_id | 是 | string | 群id |
to_wxid_list | 是 | array | 群成员的wxid |
参数名 | 数据类型 | 说明 |
---|---|---|
ret | number | 0:成功 |
msg | string | 反馈信息 |
data | object |
{
"appid": "wxid_p3r6ddddvqcl22",
"group_id": "34876481524@chatroom",
"to_wxid_list": [
"wxid_4bxxxxxxxxxxx22"
]
}
{
"ret": 0,
"msg": "success",
"data": {
"BaseResponse": {
"ret": 0,
"errMsg": {}
},
"ContactCount": 1, #群成员数量
"ContactList": [ #群成员信息列表
{
"UserName": { #群成员wxid
"string": "wxid_4bxxxxxxxxxxx22"
},
"NickName": { #群成员昵称
"string": "xahya"
},
"Pyinitial": { #群成员昵称拼音大写
"string": "XAHYA"
},
"QuanPin": { #群成员昵称全拼
"string": "xahya"
},
"Sex": 1, #性别
"ImgBuf": {
"iLen": 0
},
"Remark": {}, 群里的昵称
"ContactType": 0,
"Province": "Jiangsu", #省份
"City": "Xuzhou", #城市
"Signature": "123", #个性签名
"Alias": "_xahya", #微信号
"BigHeadImgUrl": "https://fA0rWibpibG2WNjPrOTE/0", #大号头像
"SmallHeadImgUrl": "https://wx.qlogNTE/132", #小号头像
"NewChatroomData": {
"MemberCount": 1,
"ChatRoomMember": [
{
"UserName": "wxid_4bxxxxxxxxxxx22",
"ChatroomMemberFlag": 0,
"InviterUserName": "wxid_p3r6ddddvqcl22" #邀请人wxid
}
],
},
"ChatroomStatus": 0,
"textStatusFlag": 2,
}
],
"Ret": [
0
],
"Ticket": [
{}
]
}
}
{
"ret": -1,
"msg_err": "[{{appidd}}]设备不存在或已离线"
}
- 默认会@群组全员
- 注意内容,避免风控
Content-Type:application/json
X-GEWE-TOKEN: 后台获取
参数名 | 必填 | 数据类型 | 说明 |
---|---|---|---|
appid | 是 | string | 设备id |
content | 是 | string | 添加好友验证信息 |
group_id | 是 | string | 群id |
参数名 | 数据类型 | 说明 |
---|---|---|
ret | number | 0:成功 |
msg | string | 反馈信息 |
data | object |
{
"appid": "wxid_p3r6ddddvqcl22",
"content": "设置群公告",
"group_id": "34876481524@chatroom",
}
{
"ret": 0,
"msg": "success",
"data": {
"BaseResponse": {
"ret": 0,
"errMsg": {}
}
}
}
{
"ret": -1,
"msg_err": "[{{appidd}}]设备不存在或已离线"
}