企微机器人消息发送说明
# 获取群列表
请求方式:GET
请求接口:http://127.0.0.1:12345/wx/getGroup?clientId=1&pageSize=10&pageNum=1
返回数据:
{
"list":[
{
"create_time":"",
"create_user_id":"",
"is_external":"",
"is_manager":"",
"nickname":"", //群名称
"notice_content":"",
"notice_time":"0",
"notice_user_id":"0",
"room_id":"", // 群id
"total":"3"
}
],
"page_num":1,
"page_size":10,
"syncKey":"XSciN-UeMolYdgcH8u40k",
"total":1,
"total_page":1
}
# 发送文本消息
请求方式:POST
请求接口:http://127.0.0.1:12345/wx/sendText
请求参数:JSON格式
{
"clientId": 1, // 单台机器固定为1
"groupId": "", //群id
"text": "1" //发送消息,\n换行
}
成功返回内容:
{
"data":{
"at_list":[
],
"content":"",
"conversation_id":"",
"is_pc_send":1,
"is_room":1,
"msg_id":1,
"msgtype":2,
"receiver":"0",
"room_conversation_id":"",
"sender":"",
"sendtime":1683613482,
"server_id":,
"syncKey":"a_DURn3RVYt27PnF8OO11"
},
"errcode":0,
"errmsg":"ok" // ok为成功
}
失败返回内容:
null
# 发送图片
请求方式:POST
请求接口:http://127.0.0.1:12345/wx/sendPic
请求参数:JSON格式
{
"clientId": 1, //固定值
"groupId": "", //群ID
"picUrl": "" //图片地址,包含http://
}
成功返回内容:
{
"data": {
//忽略
},
"errcode": 0,
"errmsg": "ok" //发送陈宫
}
失败返回内容:
null
# 获取wxid
请求方式: GET
请求接口: http://127.0.0.1:12345/wx/getid
返回内容: wxid
# 联系方式
QQ:2464927871 、3411687290
VX:weblue_data
| 微信客服-01 | 微信客服-02 |
|---|---|
![]() | ![]() |
上次更新: 2023/05/15, 10:16:36

