Commit 0c5c3beb by 李进峰

添加晓悟咪咪的文档

parent 815adbda
## 1.1 微信服务器与自己服务器确认
## 1.1 微信服务器与自己服务器确认
1. 请求参数
2. Request Method: get
Path: /weixin/confirmServer
3. | 参数名 | 参数类型 | 描述 | 必须 |
| --------- | -------- | ------------------------------------------------------------ | ---- |
| signature | String | 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数 | Y |
| timestamp | String | 时间戳 | Y |
| nonce | String | 随机数 | Y |
| echostr | String | 验证成功,则原样返回 | |
- 请求参数示例
```
curl --location --request GET 'http://localhost:34567/weixin/confirmServer?signature=f33d3722f295363b5edb3321de049d5673ad667f&timestamp=20086&nonce=10086&echostr=return' \
--header 'Content-Type: application/json' \
--data-raw '
'
```
4.响应参数示例
```
success:
return
成功只是把echostr原样返回,失败则返回null
```
## 1.1 微信服务器与自己服务器确认
## 1.1 微信服务器与自己服务器确认
1. 请求参数
2. Request Method: get
Path: /aot/getAotParameter
3. | 参数名 | 参数类型 | 描述 | 必须 |
| --------- | -------- | ------------------------------------------------------------ | ---- |
| signature | String | 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数 | Y |
| timestamp | String | 时间戳 | Y |
| nonce | String | 随机数 | Y |
| echostr | String | 验证成功,则原样返回 | |
- 请求参数示例
```
curl --location --request GET 'http://localhost:34567/weixin/confirmServer?signature=f33d3722f295363b5edb3321de049d5673ad667f&timestamp=20086&nonce=10086&echostr=return' \
--header 'Content-Type: application/json' \
--data-raw '
'
```
4.响应参数示例
```
success:
return
成功只是把echostr原样返回,失败则返回null
```
<center><h2>晓悟咪咪接口文档</h2></center>
<center><h2>晓悟咪咪接口文档</h2></center>
- 基本地址
- 测试环境: https://api-pre.heyqiwu.cn/api/xiaowumimi/
- 生产环境: https://xiaowumimi.heyqiwu.cn/api/xiaowumimi/
---
### 1. 获取当前时间
URL: {基本地址}/direct/obtain/timestamp
METHOD: POST
RequestBody:
```
{
"appkey":"xiaowumimitest-toyrobot-api-test", // 渠道ID
"sn":"test", // 设备号
"verify":"738cc4d34d017f1b6779307ea401a3ac" // 验证字段
}
```
ResponseBody:
```
{
"code": 1,
"msg": "成功",
"data": {
"date": { // 时间对象
"year": 2021,
"month": 11,
"day": 16,
"hour": 10,
"minute": 38,
"second": 57
},
"timestamp": 1637030337 // 秒级时间戳
}
}
```
<br>
---
### 2. 获取最新固件信息
URL: {基本地址}/aot/getVersion
METHOD: POST
RequestBody:
```
{
"appkey":"xiaowumimitest-toyrobot-api-test", // 渠道ID
"sn":"test", // 设备号
"verify":"738cc4d34d017f1b6779307ea401a3ac" // 验证字段
}
```
ResponseBody:
```
{
"code": 1,
"msg": "成功",
"data": {
"ver": 3, // 最新固件版本号
"delay": 0, // 是否强制升级,0表示强制升级,1表示以后再升级(非强制)
"url": "http://hw-gz49.heyqiwu.cn/xiaowumimiaot/bobi_v3.bin" //新版本固件链接地址
}
}
```
---
## 获取access_token
1. 请求参数
2. Request Method: get
Path: /weixin/enterLogin
3.响应参数
- 响应参数示例
```
success:
{
"code": 1,
"msg": "成功",
"data": null
}
fail:
{
"code": 1,
"msg": "失败",
"data": invalid appid
}
```
## 获取ticket
1. 请求参数
2. Request Method: get
Path: /weixin/getTicket
3. 请求参数
| 参数名 | 参数类型 | 描述 | 必须 |
| --------- | -------- | ------ | ---- |
| noncestr | String | 随机串 | Y |
| timestamp | String | 时间戳 | Y |
| url | String | uri | Y |
4.请求示例
```
curl --location --request GET 'http://hw-gz49.heyqiwu.cn/api/wx/official/weixin/getTicket?noncestr=Wm3WZYTPz0wzccnW&timestamp=1414587457&url=http://mp.weixin.qq.com?params=value'
```
5.响应参数
- 响应参数示例
```
success:
{
"code": 1,
"msg": "成功",
"data": "42fed5dac9d90f8824cc99d850d472cdf5759adc"
}
failure:
{
"code": 50001,
"msg": "数据未找到",
"data": null
}
```
## 1.1 获取当前时间戳
## 1.1 获取当前时间戳
1. 请求参数
2. Request Method: post
Path: direct/obtain/timestamp
3. | 参数名 | 参数类型 | 描述 | 必须 |
| ------ | -------- | ------------------------- | ---- |
| appkey | String | 业务appkey | Y |
| sn | String | 设备序列号 | Y |
| verify | String | 验证串MD5(appsecret+sn) | Y |
- 请求参数示例
```
curl --location --request POST 'http://hw-gz49.heyqiwu.cn/api/wx/official/direct/obtain/timestamp' \
--header 'Content-Type: application/json' \
--data-raw '{
"appkey":"xiaowumimitest-toyrobot-api-test",
"sn":"test",
"verify":"738cc4d34d017f1b6779307ea401a3ac"
}'
{
"appkey":"xiaowumimitest-toyrobot-api-test",
"sn":"test",
"verify":"738cc4d34d017f1b6779307ea401a3ac"
}
```
4.响应参数示例
```
success:
{
"retcode": 1,
"msg": "成功",
"data": {
"date": {
"year": 2021,
"month": 11,
"day": 9,
"hour": 7,
"minute": 55,
"second": 50
},
"timestamp": 1636458950
}
}
failure:
{
"retcode": 70001,
"msg": "无访问权限",
"data": "验证失败"
}
```
## 1.1 设备升级
## 1.1 设备升级
1. 请求参数
2. Request Method: post
Path: aot/getVersion
3. | 参数名 | 参数类型 | 描述 | 必须 |
| ------ | -------- | ------------------------- | ---- |
| appkey | String | 业务appkey | Y |
| sn | String | 设备序列号 | Y |
| verify | String | 验证串MD5(appsecret+sn) | Y |
- 请求参数示例
```
curl --location --request POST 'http://hw-gz49.heyqiwu.cn/api/wx/official/aot/getVersion' \
--header 'Content-Type: application/json' \
--data-raw '{
"appkey":"xiaowumimitest-toyrobot-api-test",
"sn":"test",
"verify":"738cc4d34d017f1b6779307ea401a3ac"
}'
```
4.响应参数示例
```
success:
{
"retcode": 1,
"msg": "成功",
"data": {
"ver": 3,
"delay": 0,
"url": "http://hw-gz49.heyqiwu.cn/xiaowumimiaot/bobi_v3.bin"
}
}
failure:
{
"retcode": 70001,
"msg": "无访问权限",
"data": "验证失败"
}
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment