- 文档必读
- 个人微信
- 个人微信(DLL) 支持http+tcp
- 监听回调事件
- api请求
- 发送消息
- cdn消息
- rpa消息
- 好友相关接口
- 企业微信
- 登录相关接口
- 群相关接口
- 机器人相关接口
- 微信相关接口
- 小程序
- 转账相关
- 朋友圈
- 收藏
- 视频号
- 标签管理
- 直播间
- 数据库
- 公众号
- A8Key接口POST
- H5Key接口POST
- 清理聊天记录POST
- 语音消息转文本POST
- 置顶/取消置顶聊天POST
- 开启/关闭消息免打扰POST
- 解密图片POST
- 解密图片 CopyPOST
- 获取本地图片Base64(根据本地图片路径获取Base64)POST
- 获取Cdn图片Base64(根据cdn路径获取Base64) POST
- 发送聊天记录消息POST
- 查询好友/群聊信息(废弃)POST
- 企业微信(开发中)
- 更新日志
- 插件敏感词审核机制
发送xml消息
POST
http://localhost:10001/api/processor
请求参数
Body 参数application/json
type
enum<string>
事件类型
枚举值:
sendXmlMessage
params
object
参数数据
robotId
string
机器人微信ID
示例值:
当前机器人微信ID
instanceId
string
可选
示例值:
实例id 和 robotId 二者填一者就可以
wxId
string
消息接收方微信id
示例值:
接收方微信id
xml
string
xml
示例值:
<?xml version=\"1.0\"?><msg><appmsg appid=\"\" sdkver=\"0\"><title>哈咯</title><username /><action>view</action><type>33</type><showtype>0</showtype><content /><contentattr>0</contentattr><androidsource>3</androidsource><sourceusername>gh_6506303a12bb@app</sourceusername><sourcedisplayname>点我进入饿了么</sourcedisplayname><commenturl /><thumburl></thumburl><weappinfo><username>gh_6506303a12bb@app</username><version>4</version><pagepath><![CDATA[pages/index/index.html]]></pagepath><type>2</type><appservicetype>0</appservicetype></weappinfo><statextstr /><websearch /></appmsg><fromusername>wxid_nq6r0w9v12612</fromusername><scene>0</scene><appinfo><version>1</version><appname></appname></appinfo></msg>
示例
{
"type": "sendXmlMessage",
"params": {
"robotId": "当前机器人微信ID",
"instanceId": "实例id 和 robotId 二者填一者就可以",
"wxId": "接收方微信id",
"xml": "<?xml version=\\\"1.0\\\"?><msg><appmsg appid=\\\"\\\" sdkver=\\\"0\\\"><title>哈咯</title><username /><action>view</action><type>33</type><showtype>0</showtype><content /><contentattr>0</contentattr><androidsource>3</androidsource><sourceusername>gh_6506303a12bb@app</sourceusername><sourcedisplayname>点我进入饿了么</sourcedisplayname><commenturl /><thumburl></thumburl><weappinfo><username>gh_6506303a12bb@app</username><version>4</version><pagepath><![CDATA[pages/index/index.html]]></pagepath><type>2</type><appservicetype>0</appservicetype></weappinfo><statextstr /><websearch /></appmsg><fromusername>wxid_nq6r0w9v12612</fromusername><scene>0</scene><appinfo><version>1</version><appname></appname></appinfo></msg>"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:10001/api/processor' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "sendXmlMessage",
"params": {
"robotId": "当前机器人微信ID",
"instanceId": "实例id 和 robotId 二者填一者就可以",
"wxId": "接收方微信id",
"xml": "<?xml version=\\\"1.0\\\"?><msg><appmsg appid=\\\"\\\" sdkver=\\\"0\\\"><title>哈咯</title><username /><action>view</action><type>33</type><showtype>0</showtype><content /><contentattr>0</contentattr><androidsource>3</androidsource><sourceusername>gh_6506303a12bb@app</sourceusername><sourcedisplayname>点我进入饿了么</sourcedisplayname><commenturl /><thumburl></thumburl><weappinfo><username>gh_6506303a12bb@app</username><version>4</version><pagepath><![CDATA[pages/index/index.html]]></pagepath><type>2</type><appservicetype>0</appservicetype></weappinfo><statextstr /><websearch /></appmsg><fromusername>wxid_nq6r0w9v12612</fromusername><scene>0</scene><appinfo><version>1</version><appname></appname></appinfo></msg>"
}
}'
返回响应
🟢200成功
application/json
Body
code
integer
状态码
示例值:
200
description
string
描述
示例值:
发送成功
time
integer
时间戳
示例值:
1716704721419
data
object
必需
robotId
string
机器人微信id
instanceId
string
实例id
示例
{
"code": 200,
"description": "发送成功",
"time": 1716704721419,
"data": {
"robotId": "string",
"instanceId": "string"
}
}
修改于 2025-03-10 17:33:20