群管理/群聊邀请验证
简要描述
- 获取群聊邀请验证的完整链接,POST访问即可入群。
请求URL
http://127.0.0.1:8888/api/
请求方式
参数
参数名 | 必选 | 类型 | 说明 |
---|
type | 是 | int | 接口编号 |
url | 是 | string | 群邀请原始链接,从消息推送接口获取或从二维码中提取 |
inviteType | 是 | int | 0:链接,1:二维码 |
请求示例
{
"type": 10089,
"url": "https://szsupport.weixin.qq.com/cgi-bin/mmsupport-bin/addchatroombyinvite?ticket=..."
"inviteType":0
}
先请求10089获取到链接,然后要主动post一下
如果使用的链接是从二维码信息中获取的,直接POST返回的url可能不生效,此时可以补充以下请求头信息,也可以自己抓包获取相关信息:
{
"Host": "support.weixin.qq.com",
"Connection": "keep-alive",
"Cache-Control": "max-age=0",
"Upgrade-Insecure-Requests": "1",
"Origin": "https://support.weixin.qq.com",
"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 NetType/WIFI MicroMessenger/7.0.20.1781(0x6700143B) WindowsWechat(0x63090a13) XWEB/9185",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-User": "?1",
"Sec-Fetch-Dest": "document",
"Referer": "接口返回的url",
"Accept-Language": "zh-CN,zh;q=0.9",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "0"
}
返回示例
{
"data": {
"status": 0,
"desc": "",
"data": []
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|
error_code | int | 错误代码 |
description | string | 错误描述 |
data | json | 业务数据 |
备注