StarBot
  1. api请求
StarBot
  • 文档必读
    • 文档说明
    • 风控说明
    • 使用说明
    • 版本对比
  • 监听回调事件
    • 登录的机器人->微信启动成功
    • 微信登录成功事件
    • 收到私聊消息事件
    • 收到群聊消息事件
    • 收到公众号消息事件
    • 收到转账事件
    • 收到撤回消息事件
    • 收到好友申请事件
    • 二维码收款事件
  • api请求
    • 获取群聊列表
      POST
    • 获取好友列表
      POST
    • 获取机器人信息
      POST
    • 发送文本消息
      POST
    • 回复引用文本消息
      POST
    • 回复引用文本消息-新
      POST
    • 发送图片消息
      POST
    • 发送xml消息
      POST
    • 发送文件消息
      POST
    • 发送动态表情GIF消息
      POST
    • 发送url卡片消息
      POST
    • 发送小程序消息
      POST
    • 发送音乐分享消息
      POST
    • 发送聊天记录消息
      POST
    • 发送名片消息
      POST
    • 发送名片xml消息
      POST
    • 获取机器人登录状态信息
      POST
    • 获取机器人登录二维码信息(存在bug)请转至买断版本
      POST
    • 同意好友申请
      POST
    • 添加好友
      POST
    • 从群里添加好友
      POST
    • 删除好友
      POST
    • 修改好友/群聊备注
      POST
    • 查询陌生账号信息
      POST
    • 查询好友/群聊信息
      POST
    • 退出群聊
      POST
    • 创建群聊
      POST
    • 查询群聊信息
      POST
    • 添加群成员
      POST
    • 邀请群成员
      POST
    • 移除群成员
      POST
    • 修改机器人群昵称
      POST
    • 查询群聊成员列表
      POST
    • 获取群成员昵称
      POST
    • 确认收款
      POST
    • 退还收款
      POST
    • 打开浏览器
      POST
    • 启动微信
      POST
    • 关闭微信
      POST
    • 获取机器人列表
      POST
    • 删除离线的机器人信息
      POST
    • 根据wxId获取机器人信息
      POST
    • 根据instanceId获取机器人信息
      POST
  1. api请求

发送名片xml消息

POST
http://localhost:10001/api/processor

请求参数

Body 参数application/json
type
enum<string> 
事件类型
必需
枚举值:
sendCardXmlMessage
params
object 
参数数据
必需
robotId
string 
机器人微信ID
必需
示例值:
当前机器人微信ID
instanceId
string 
可选
实例Id,robotId和instanceId任意填写一个就可以
示例值:
实例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": "sendCardXmlMessage",
  "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": "sendCardXmlMessage",
    "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"
  }
}
修改于 2024-09-25 11:45:26
上一页
发送名片消息
下一页
获取机器人登录状态信息
Built with