发送消息/发送文本
简要描述
请求URL
http://127.0.0.1:8888/api/
请求方式
参数
参数名 | 必选 | 类型 | 说明 |
---|
type | 是 | int | 接口编号 |
userName | 是 | string | 接收人wxid |
msgContent | 是 | string | 文本内容 |
atUserList | 否 | list | 被艾特wxid列表 |
insertToDatabase | 否 | bool | 是否将消息回写到数据库中,默认为true,<br/>如果您发现某些电脑出现阻塞可设置为false<br/>该参数在1.0.4.f2及以上版本出现 |
bAsync | 否 | bool | 如果将该参数设置为true,则任务不再阻塞,接口响应内容会通过消息处理器返回,消息推送类型为0<br/>如果提供了asyncUserData参数,会随调用结果一起推送 |
asyncUserData | 否 | str | xxxx |
请求示例
{
"type": 10009,
"userName": "xxxx@chatrooom",
"msgContent": "@xxx 123",
"atUserList": [
"wxid_xxxx1",
"wxid_xxxx1"
],
"insertToDatabase":false
}
为什么@人没有效果?
1、msgContent里要加上 @对方昵称 这些内容
为什么你们不直接把@xxx这一步做好
1、不知道放在哪个位置,有些人要放在最前面,有些人要最后面,有些人想在中间,众口难调,自行处理
@所有人
{
"type": 10009,
"userName": "xxxx@chatrooom",
"msgContent": "@所有人 123",
atUserList: ["notify@all"]
}
为什么@所有人没有效果?
1、检查是不是管理员
2、msgContent里有没有【@所有人】这几个字符
返回示例
{
"data": {
"status": 0,
"desc": "",
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|
error_code | int | 错误代码 |
description | string | 错误描述 |
data | json | 业务数据 |
备注