mirror of
https://github.com/ttttupup/wxhelper.git
synced 2024-11-23 10:49:24 +08:00
1004 lines
20 KiB
Markdown
1004 lines
20 KiB
Markdown
#### 编译构建
|
||
环境:
|
||
cl.exe目录= c:/cl.exe
|
||
ml64.exe目录 =c:/ml64.exe
|
||
vcpkg目录 = c:/vcpkg
|
||
wxhelper目录 = c:/wxhelper
|
||
```
|
||
|
||
vcpkg install detours:x64-windows
|
||
vcpkg install nlohmann-json:x64-windows
|
||
|
||
cd wxhelper
|
||
mkdir build
|
||
cd build
|
||
cmake -DCMAKE_C_COMPILER=cl.exe \
|
||
-DCMAKE_CXX_COMPILER=cl.exe \
|
||
-DCMAKE_ASM_MASM_COMPILER=ml64.exe \
|
||
-DCMAKE_BUILD_TYPE=Debug \
|
||
-DCMAKE_INSTALL_PREFIX=C:/wxhelper/install/x64-debug \
|
||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||
-SC:c:/wxhelper \
|
||
-BC:c:/wxhelper/build/x64-debug\
|
||
-G Ninja
|
||
cmake --build ..
|
||
```
|
||
如果有错误按错误提示修正即可。
|
||
|
||
## 3.9.8.25版本,http接口文档,文档仅供参考。
|
||
|
||
### 简单说明:
|
||
所有接口只支持post方法。
|
||
全部使用json格式。
|
||
格式: http://host:port/api/xxxx
|
||
host: 绑定的host
|
||
port: 监听的端口
|
||
xxxx: 对应的功能路径
|
||
返回结构的json格式:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": {},
|
||
"msg": "success"
|
||
}
|
||
```
|
||
code: 错误码
|
||
msg: 成功/错误信息
|
||
data: 接口返回的数据
|
||
|
||
|
||
|
||
#### 0.检查微信登录**
|
||
###### 接口功能
|
||
> 检查微信是否登录
|
||
|
||
###### 接口地址
|
||
> [/api/checkLogin](/api/checkLogin)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,1 成功, 0失败|
|
||
|result|string|成功提示|
|
||
|data|string|响应内容|
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"msg": "success",
|
||
"data":null
|
||
}
|
||
```
|
||
|
||
|
||
#### 1.获取登录用户信息**
|
||
###### 接口功能
|
||
> 获取登录用户信息
|
||
|
||
###### 接口地址
|
||
> [/api/userInfo](/api/userInfo)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,1 成功, 0失败|
|
||
|result|string|成功提示|
|
||
|data|object|响应内容|
|
||
|  account|string|账号|
|
||
|  headImage|string|头像|
|
||
|  city|string|城市|
|
||
|  country|string|国家|
|
||
|  currentDataPath|string|当前数据目录,登录的账号目录|
|
||
|  dataSavePath|string|微信保存目录|
|
||
|  mobile|string|手机|
|
||
|  name|string|昵称|
|
||
|  province|string|省|
|
||
|  wxid|string|wxid|
|
||
|  signature|string|个人签名|
|
||
|  dbKey|string|数据库的SQLCipher的加密key,可以使用该key配合decrypt.py解密数据库
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": {
|
||
"account": "xxx",
|
||
"city": "Zhengzhou",
|
||
"country": "CN",
|
||
"currentDataPath": "C:\\WeChat Files\\wxid_xxx\\",
|
||
"dataSavePath": "C:\\wechatDir\\WeChat Files\\",
|
||
"dbKey": "965715e30e474da09250cb5aa047e3940ffa1c8f767c4263b132bb512933db49",
|
||
"headImage": "https://wx.qlogo.cn/mmhead/ver_1/MiblV0loY0GILewQ4u2121",
|
||
"mobile": "13912341234",
|
||
"name": "xxx",
|
||
"province": "Henan",
|
||
"signature": "xxx",
|
||
"wxid": "wxid_22222",
|
||
"privateKey":"-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQCsC8wKKfylbnl0QpcowI4XDoCMlDptEeVq1aY0w9nR62llfjVL\nKIDbHMf9+tCxv5MWBuxrZgldzLkSQ/M5XwL5HQrO+XTj9Sx/ -END RSA PRIVATE KEY-----\n",
|
||
"publicKey":"-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQAB\n-----END PUBLIC KEY-----\n"
|
||
},
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
|
||
#### 2.发送文本消息**
|
||
###### 接口功能
|
||
> 发送文本消息
|
||
|
||
###### 接口地址
|
||
> [/api/sendTextMsg](/api/sendTextMsg)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|wxid |true |string| 接收人wxid |
|
||
|msg|true |string|消息文本内容|
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,不为0成功, 0失败|
|
||
|msg|string|成功提示|
|
||
|data|object|null|
|
||
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"wxid": "filehelper",
|
||
"msg": "1112222"
|
||
}
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{"code":345686720,"msg":"success","data":null}
|
||
```
|
||
|
||
#### 3.hook消息**
|
||
###### 接口功能
|
||
> hook接收文本消息,图片消息,群消息.该接口将hook的消息通过tcp回传给本地的端口。
|
||
enableHttp=1时,使用url,timeout参数配置服务端的接收地址。请求为post,Content-Type 为json。
|
||
enableHttp=0时,使用ip,port的tcp服务回传消息。
|
||
|
||
###### 接口地址
|
||
> [/api/hookSyncMsg](/api/hookSyncMsg)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|port |true |string| 本地服务端端口,用来接收消息内容 |
|
||
|ip |true |string| 服务端ip地址,用来接收消息内容,可以是任意ip,即tcp客户端连接的服务端的ip|
|
||
|url |true |string| http的请求地址,enableHttp=1时,不能为空 |
|
||
|timeout |true |string| 超时时间,单位ms|
|
||
|enableHttp |true |bool| true/false :true.启用http false.不启用http|
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,0成功, 非0失败|
|
||
|data|object|null|
|
||
|msg|string|成功提示|
|
||
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"port": "19099",
|
||
"ip":"127.0.0.1",
|
||
"url":"http://localhost:8080",
|
||
"timeout":"3000",
|
||
"enableHttp":false
|
||
}
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{"code":0,"msg":"success","data":null}
|
||
```
|
||
|
||
#### 4.取消hook消息**
|
||
###### 接口功能
|
||
> 取消hook消息
|
||
|
||
###### 接口地址
|
||
> [/api/unhookSyncMsg](/api/unhookSyncMsg)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,0成功, 非0失败|
|
||
|data|object|null|
|
||
|msg|string|成功提示|
|
||
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{"code":0,"msg":"success","data":null}
|
||
```
|
||
|
||
#### 5.好友列表**
|
||
###### 接口功能
|
||
> 好友列表
|
||
|
||
###### 接口地址
|
||
> [/api/getContactList](/api/getContactList)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,0成功, 非0失败|
|
||
|data|object|好友信息|
|
||
|  customAccount|string|自定义账号|
|
||
|  encryptName|string|昵称|
|
||
|  nickname|string|昵称|
|
||
|  pinyin|string|简拼|
|
||
|  pinyinAll|string|全拼|
|
||
|  remark|string|备注|
|
||
|  remark_pinyin|string|备注拼音|
|
||
|  remark_pinyin_all|string|备注全拼|
|
||
|  label_ids|string|标签id|
|
||
|  reserved1|number|未知|
|
||
|  reserved2|number|未知|
|
||
|  type|number|未知|
|
||
|  verifyFlag|number|未知|
|
||
|  wxid|string|wxid|
|
||
|msg|string|成功提示|
|
||
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": [
|
||
{
|
||
"customAccount": "",
|
||
"encryptName": "v3_020b3826fd03010000000000e04128fddf4d90000000501ea9a3dba12f95f6b60a0536a1adb6b40fc4086288f46c0b89e6c4eb8062bb1661b4b6fbab708dc4f89d543d7ade135b2be74c14b9cfe3accef377b9@stranger",
|
||
"nickname": "文件传输助手",
|
||
"pinyin": "WJCSZS",
|
||
"pinyinAll": "wenjianchuanshuzhushou",
|
||
"remark":"",
|
||
"remark_pinyin":"",
|
||
"remark_pinyin_all":"",
|
||
"label_ids":"",
|
||
"reserved1": 1,
|
||
"reserved2": 1,
|
||
"type": 3,
|
||
"verifyFlag": 0,
|
||
"wxid": "filehelper"
|
||
}
|
||
].
|
||
"msg": "success"
|
||
|
||
```
|
||
|
||
#### 6.获取数据库信息**
|
||
###### 接口功能
|
||
> 获取数据库信息和句柄
|
||
|
||
###### 接口地址
|
||
> [/api/getDBInfo](/api/getDBInfo)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,0成功, 非0失败|
|
||
|msg|string|返回信息|
|
||
|data|array|好友信息|
|
||
|  databaseName|string|数据库名称|
|
||
|  handle|number|句柄|
|
||
|  tables|array|表信息|
|
||
|    name|string|表名|
|
||
|    rootpage|string|rootpage|
|
||
|    sql|string|ddl语句|
|
||
|    tableName|string|表名|
|
||
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": [
|
||
{
|
||
"databaseName": "MicroMsg.db",
|
||
"handle": 1755003930784,
|
||
"tables": [
|
||
{
|
||
"name": "Contact",
|
||
"rootpage": "2",
|
||
"sql": "CREATE TABLE Contact(UserName TEXT PRIMARY KEY ,Alias TEXT,EncryptUserName TEXT,DelFlag INTEGER DEFAULT 0,Type INTEGER DEFAULT 0,VerifyFlag INTEGER DEFAULT 0,Reserved1 INTEGER DEFAULT 0,Reserved2 INTEGER DEFAULT 0,Reserved3 TEXT,Reserved4 TEXT,Remark TEXT,NickName TEXT,LabelIDList TEXT,DomainList TEXT,ChatRoomType int,PYInitial TEXT,QuanPin TEXT,RemarkPYInitial TEXT,RemarkQuanPin TEXT,BigHeadImgUrl TEXT,SmallHeadImgUrl TEXT,HeadImgMd5 TEXT,ChatRoomNotify INTEGER DEFAULT 0,Reserved5 INTEGER DEFAULT 0,Reserved6 TEXT,Reserved7 TEXT,ExtraBuf BLOB,Reserved8 INTEGER DEFAULT 0,Reserved9 INTEGER DEFAULT 0,Reserved10 TEXT,Reserved11 TEXT)",
|
||
"tableName": "Contact"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"msg":"success"
|
||
}
|
||
```
|
||
|
||
|
||
#### 7.查询数据库**
|
||
###### 接口功能
|
||
> 查询数据库
|
||
|
||
###### 接口地址
|
||
> [/api/execSql](/api/execSql)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|dbHandle |true |number| |
|
||
|sql |true |string| 执行的sql |
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,0成功, 非0失败|
|
||
|msg|string|返回信息|
|
||
|data|array|sqlite返回的结果|
|
||
|
||
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"dbHandle":2006119800400,
|
||
"sql":"select * from MSG where localId =301;"
|
||
}
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": [
|
||
[
|
||
"localId",
|
||
"TalkerId",
|
||
"MsgSvrID",
|
||
"Type",
|
||
"SubType",
|
||
"IsSender",
|
||
"CreateTime",
|
||
"Sequence",
|
||
"StatusEx",
|
||
"FlagEx",
|
||
"Status",
|
||
"MsgServerSeq",
|
||
"MsgSequence",
|
||
"StrTalker",
|
||
"StrContent",
|
||
"DisplayContent",
|
||
"Reserved0",
|
||
"Reserved1",
|
||
"Reserved2",
|
||
"Reserved3",
|
||
"Reserved4",
|
||
"Reserved5",
|
||
"Reserved6",
|
||
"CompressContent",
|
||
"BytesExtra",
|
||
"BytesTrans"
|
||
],
|
||
[
|
||
"301",
|
||
"1",
|
||
"8824834301214701891",
|
||
"1",
|
||
"0",
|
||
"0",
|
||
"1685401473",
|
||
"1685401473000",
|
||
"0",
|
||
"0",
|
||
"2",
|
||
"1",
|
||
"795781866",
|
||
"wxid_123",
|
||
"testtest",
|
||
"",
|
||
"0",
|
||
"2",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"",
|
||
"CgQIEBAAGo0BCAcSiAE8bXNnc291cmNlPJPHNpZ25hdHVyZT52MV9wd12bTZyRzwvc2lnbmF0dXJPgoJPHRtcF9ub2RlPgoJCTxwsaXNoZXItaWQ+Jmx0OyFbQ0RBVEFbXV0mZ3Q7PC9wdWJsaXNoZXItaWQ+Cgk8L3RtcF9ub2RlPgo8L21zZ3NvdXJjZT4KGiQIAhIgNDE1MDA0NjRhZTRmMjk2NjhjMzY2ZjFkOTdmMjAwNDg=",
|
||
""
|
||
]
|
||
],
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
|
||
#### 8.锁定微信**
|
||
###### 接口功能
|
||
> 锁定微信
|
||
|
||
###### 接口地址
|
||
> [/api/lockWeChat](/api/lockWeChat)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, 小于0失败|
|
||
|msg|string|返回信息|
|
||
|data|object|null|
|
||
|
||
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 2,
|
||
"data": null,
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 9.解锁微信**
|
||
###### 接口功能
|
||
> 锁定微信
|
||
|
||
###### 接口地址
|
||
> [/api/unlockWeChat](/api/unlockWeChat)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, 小于0失败|
|
||
|msg|string|返回信息|
|
||
|data|object|null|
|
||
|
||
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 2,
|
||
"data": null,
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 10.进入微信**
|
||
###### 接口功能
|
||
> 打开微信时的进入微信按钮
|
||
|
||
###### 接口地址
|
||
> [/api/clickEnterWeChat](/api/clickEnterWeChat)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, 小于0失败|
|
||
|msg|string|返回信息|
|
||
|data|object|null|
|
||
|
||
|
||
|
||
###### 接口示例
|
||
入参:
|
||
``` javascript
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": null,
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 11.转发消息**
|
||
###### 接口功能
|
||
> 转发微信消息
|
||
|
||
###### 接口地址
|
||
> [/api/forwardMsg](/api/forwardMsg)
|
||
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|wxid|string|接收人id|
|
||
|msgId|string|消息id|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,1成功, -1失败|
|
||
|msg|string|成功提示|
|
||
|data|object|null|
|
||
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"wxid":"filehelper",
|
||
"msgId":"1233312233123"
|
||
}
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": null,
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 12.发送图片**
|
||
###### 接口功能
|
||
> 发送图片
|
||
|
||
###### 接口地址I
|
||
> [/api/sendImagesMsg](/api/sendImagesMsg)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|wxid|string|wxid|
|
||
|imagePath|string|图片路径|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, -1失败|
|
||
|msg|string|成功提示|
|
||
|data|object|null|
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
|
||
{
|
||
"wxid":"filehelper",
|
||
"imagePath":"C:\\test.png"
|
||
}
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": {},
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 13.发送文件消息**
|
||
###### 接口功能
|
||
> 发送文件消息
|
||
|
||
###### 接口地址
|
||
> [/api/sendFileMsg](/api/sendFileMsg)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|wxid |true |string| 接收人wxid |
|
||
|filePath|true |string|文件绝对路径|
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,不为0成功, 0失败|
|
||
|msg|string|成功提示|
|
||
|data|object|null|
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"wxid": "filehelper",
|
||
"filePath": "c:\\test.zip"
|
||
}
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{"code":345686720,"msg":"success","data":null}
|
||
```
|
||
|
||
#### 14.发送@消息**
|
||
###### 接口功能
|
||
> 发送@消息
|
||
|
||
###### 接口地址
|
||
> [/api/sendAtText](/api/sendAtText)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|wxids|string|wxid字符串,多个用,分隔,发送所有人传值"notify@all"|
|
||
|chatRoomId|string|群id|
|
||
|msg|string|消息内容|
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, -1失败|
|
||
|msg|string|成功提示|
|
||
|data|object|null|
|
||
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
{
|
||
|
||
"wxids":"notify@all",
|
||
"chatRoomId":"123@chatroom",
|
||
"msg":"你们好啊"
|
||
|
||
}
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 67316444768,
|
||
"data": null,
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 15.发送多个不同@消息**
|
||
###### 接口功能
|
||
> 发送多个不同@消息
|
||
|
||
###### 接口地址
|
||
> [/api/sendMultiAtText](/api/sendMultiAtText)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|chatRoomId|string|群id|
|
||
|at|array|消息数组|
|
||
|  msg|string|消息内容|
|
||
|  wxid|string|wxid字符串,多个用,分隔,发送所有人传值"notify@all"|
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, -1失败|
|
||
|msg|string|成功提示|
|
||
|data|object|null|
|
||
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"chatRoomId": "213111111004@chatroom",
|
||
"at": [
|
||
{
|
||
"wxid": "wxid_123",
|
||
"msg": "1112"
|
||
},
|
||
{
|
||
"wxid": "notify@all",
|
||
"msg": "2223"
|
||
}
|
||
]
|
||
}
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 67316444768,
|
||
"data": null,
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 16.获取扫码登录地址**
|
||
###### 接口功能
|
||
> 未登录状态下,获取登录地址,转换成二维码,手机扫码登录
|
||
|
||
###### 接口地址
|
||
> [/api/getLoginUrl](/api/getLoginUrl)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, -1失败|
|
||
|msg|string|成功提示|
|
||
|data|object|返回内容|
|
||
|  loginUrl|string|登录地址|
|
||
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": {
|
||
"loginUrl": "http://weixin.qq.com/x/extdevn1pwd_1YtY3pVY0FBTnhia1dScEtleDJ6Tl122231xJAWFVCcDAzSG5maXpjb2N0T3VmeZOUZlb0ZwdVKbFVN"
|
||
},
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 17.语音转文本**
|
||
###### 接口功能
|
||
> 语音消息转换文本
|
||
|
||
###### 接口地址
|
||
> [/api/translateVoice](/api/translateVoice)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|msgId|string|消息id|
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, -1失败|
|
||
|msg|string|成功提示|
|
||
|data|object|返回内容|
|
||
|
||
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"msgId":"23206240123137465"
|
||
}
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": null,
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 18.获取语音转文本结果**
|
||
###### 接口功能
|
||
> 获取语音转文本结果 (可以使用数据库查询功能查询,该接口只是为了方便减少hook)
|
||
|
||
###### 接口地址
|
||
> [/api/getTranslateVoiceText](/api/getTranslateVoiceText)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|msgId|string|消息id|
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, -1失败|
|
||
|msg|string|成功提示|
|
||
|data|object|返回内容|
|
||
|  transtext|string|转换文本|
|
||
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"msgId":"23206212223137465"
|
||
}
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": {
|
||
"transtext": "冲冲,冲冲。"
|
||
},
|
||
"msg": "success"
|
||
}
|
||
```
|
||
|
||
#### 19.通过浏览器打开url**
|
||
###### 接口功能
|
||
> 微信内置浏览器打开url,或者本地浏览器打开url
|
||
|
||
###### 接口地址
|
||
> [/api/openUrlByWeChat](/api/openUrlByWeChat)
|
||
|
||
###### HTTP请求方式
|
||
> POST JSON
|
||
|
||
###### 请求参数
|
||
|参数|必选|类型|说明|
|
||
|---|---|---|---|
|
||
|url|string|需要打开的链接|
|
||
|flag|number|内置或者本地浏览器mask ,后四位按位取值,具体参数意义自行尝试,简单可直接传0,1,2|
|
||
|
||
|
||
###### 返回字段
|
||
|返回字段|字段类型|说明 |
|
||
|---|---|---|
|
||
|code|int|返回状态,大于0成功, -1失败|
|
||
|msg|string|成功提示|
|
||
|data|object|返回内容|
|
||
|
||
|
||
|
||
###### 接口示例
|
||
|
||
入参:
|
||
``` javascript
|
||
{
|
||
"url":"http://mp.weixin.qq.com/s?__biz=MzUzMTA",
|
||
"flag":2
|
||
}
|
||
|
||
```
|
||
响应:
|
||
``` javascript
|
||
{
|
||
"code": 1,
|
||
"data": null,
|
||
"msg": "success"
|
||
}
|
||
``` |