更新 Home
parent
8bfc89f46a
commit
701110f861
49
Home.md
49
Home.md
@ -21,7 +21,10 @@
|
||||
- Header Value:XXXXXXXXXXX (<a href="https://admin.code92.top/profile/merchant" target="_blank">查看商家授权令牌</a>)
|
||||
|
||||
## 短信接码流程
|
||||
1. 获取手机号(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/sms.code/api-adm-sms.code-get.phone-Post" target="_blank">文档</a>)
|
||||
|
||||
### 获取手机号
|
||||
|
||||
方式一:主动取号(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/sms.code/api-adm-sms.code-get.phone-Post" target="_blank">文档</a>)
|
||||
|
||||
成功响应示例:
|
||||
``` json
|
||||
@ -43,10 +46,19 @@
|
||||
}
|
||||
```
|
||||
|
||||
2. 拿到手机号输入目标程序发送验证码
|
||||
方式二:自动取号推送
|
||||
|
||||
i. <a href="https://admin.code92.top/biz/phone-task" target="_blank">添加取号需求</a>
|
||||
|
||||
ii. <a href="https://admin.code92.top/push/subscriber" target="_blank">添加推送地址</a>
|
||||
|
||||
iii. 控制取号开启/停止(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/phone.task/api-adm-phone.task-set.enabled-Post" target="_blank">文档</a>)
|
||||
|
||||
---------------
|
||||
|
||||
|
||||
3. 获取验证码(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/sms.code/api-adm-sms.code-get-Post" target="_blank">文档</a>),此步骤需要多次尝试,建议设定请求间隔为5s,持续5min
|
||||
### 获取验证码
|
||||
方式一:主动获取(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/sms.code/api-adm-sms.code-get-Post" target="_blank">文档</a>),此步骤需要多次尝试,建议设定请求间隔为5s,持续5min
|
||||
|
||||
取到码响应示例:
|
||||
``` json
|
||||
@ -77,6 +89,9 @@
|
||||
}
|
||||
}
|
||||
```
|
||||
方式二:接码自动推送(<a href="https://admin.code92.top/push/subscriber" target="_blank">添加推送地址</a>)
|
||||
|
||||
|
||||
|
||||
### 报告验证码错误
|
||||
如您收到验证码输入目标程序后提示验证码不正确,可调用此接口(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/sms.code/api-adm-sms.code-report.sms.code.error-Post" target="_blank">文档</a>)上报,将该次任务状态重置为waiting, 之后继续执行步骤3,直到状态为received,即收到了新的正确的验证码。
|
||||
@ -88,7 +103,10 @@
|
||||
如果不希望获取到某个手机号,可以调用此接口(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/sms.code/api-adm-sms.code-ban.phone-Post" target="_blank">文档</a>)拉黑,拉黑之后可确保24小时内不会再次取到此手机号。
|
||||
|
||||
## 邮箱接码流程
|
||||
1. 获取邮箱号(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/mail.code/api-adm-mail.code-get.email-Post" target="_blank">文档</a>)
|
||||
|
||||
### 获取邮箱号
|
||||
|
||||
<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/mail.code/api-adm-mail.code-get.email-Post" target="_blank">查看文档</a>
|
||||
|
||||
成功响应示例:
|
||||
``` json
|
||||
@ -108,8 +126,9 @@
|
||||
"msg": "无可用邮箱号"// 错误原因
|
||||
}
|
||||
```
|
||||
2. 拿到邮箱号输入目标程序发送验证码
|
||||
3. 获取邮件码(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/mail.code/api-adm-mail.code-get-Post" target="_blank">文档</a>),此步骤需要多次尝试,建议设定请求间隔为5s,持续5min
|
||||
|
||||
### 获取邮件码
|
||||
方式一:主动获取(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/mail.code/api-adm-mail.code-get-Post" target="_blank">文档</a>),此步骤需要多次尝试,建议设定请求间隔为5s,持续5min
|
||||
|
||||
取到码响应示例:
|
||||
``` json
|
||||
@ -140,6 +159,7 @@
|
||||
}
|
||||
}
|
||||
```
|
||||
方式二:接码自动推送(<a href="https://admin.code92.top/push/subscriber" target="_blank">添加推送地址</a>)
|
||||
|
||||
### 报告验证码错误
|
||||
如您收到验证码输入目标程序后提示验证码不正确,可调用此接口(<a href="https://test-api.code92.top/index.html#/%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1/mail.code/api-adm-mail.code-report.mail.code.error-Post" target="_blank">文档</a>)上报,将该次任务状态重置为waiting, 之后继续执行步骤3,直到状态为received,即收到了新的正确的验证码。
|
||||
@ -150,15 +170,15 @@
|
||||
|
||||
## 数据订阅推送
|
||||
|
||||
除了上述主动查询接口的方式获取验证码以外,如果您拥有支持公网访问的 Web 服务器,还可以 <a target="_blank" href="https://admin.code92.top/push/subscriber">订阅数据推送</a> ,由我们在收到验证码后立即将数据推送给您。
|
||||
如果您拥有支持公网访问的 Web 服务器,还可以 <a target="_blank" href="https://admin.code92.top/push/subscriber">订阅数据推送</a> ,支持各类订阅各类事件推送。
|
||||
|
||||
通知方式也是通过 HTTP 请求传递到您的 Web 服务器。
|
||||
|
||||
### 推送协议
|
||||
|
||||
| Request Method | Request Url | Request Header | Request Body |
|
||||
|-|-|-|-|
|
||||
| POST | <a href="https://admin.code92.top/push/subscriber" target="_blank">设置用于接收数据推送的 URL 地址</a> | CLOUD-CODE-TIMESTAMP: 时间戳 <br />CLOUD-CODE-SIGN: 签名 <br />Content-Type: application/json | { "pushType": <a target="_blank" href="https://test-api.xhs92.top/index.html#/SwaggerModels/资源组件"> PushTypes </a>, "pushData": 推送数据 } |
|
||||
| Request Method | Request Url | Request Header | Request Body |
|
||||
| -------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| POST | <a href="https://admin.code92.top/push/subscriber" target="_blank">设置用于接收数据推送的 URL 地址</a> | CLOUD-CODE-TIMESTAMP: 时间戳 <br />CLOUD-CODE-SIGN: 签名 <br />Content-Type: application/json | { "pushType": <a target="_blank" href="https://test-api.xhs92.top/index.html#/SwaggerModels/资源组件"> PushTypes </a>, "pushData": 推送数据 } |
|
||||
|
||||
### 签名校验
|
||||
为了确保数据由本平台发出且未经篡改送达您的服务器, 请按照以下方式校验签名,抛弃签名不符以及时间戳误差过大的非法请求:
|
||||
@ -181,8 +201,7 @@ aadb0544aa76e57ed86481870a21f8d2
|
||||
```
|
||||
### 推送事件
|
||||
|
||||
| 事件类型 | 类型描述 | 推送数据 |
|
||||
|-|-|-|
|
||||
| smsCodeReceived | 接收到短信验证码 | <a target="_blank" href="https://test-api.xhs92.top/index.html#/SwaggerModels/资源组件">QueryRobotRsp</a> |
|
||||
| mailCodeReceived | 接收到邮件验证码 | <a target="_blank" href="https://test-api.xhs92.top/index.html#/SwaggerModels/资源组件">QueryRobotRsp</a> |
|
||||
|
||||
| 事件类型 | 类型描述 | 推送数据 |
|
||||
| ---------------- | ---------------- | ------------------------------------------------------------ |
|
||||
| smsCodeReceived | 接收到短信验证码 | <a target="_blank" href="https://test-api.xhs92.top/index.html#/SwaggerModels/资源组件">QueryRobotRsp</a> |
|
||||
| mailCodeReceived | 接收到邮件验证码 | <a target="_blank" href="https://test-api.xhs92.top/index.html#/SwaggerModels/资源组件">QueryRobotRsp</a> |
|
Loading…
x
Reference in New Issue
Block a user