更新 Home
parent
7b3ec5f728
commit
41cf061d12
40
Home.md
40
Home.md
@ -146,3 +146,43 @@
|
||||
|
||||
### 拉黑邮箱号
|
||||
如果不希望获取到某个邮箱号,可以调用此接口(<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>)拉黑,拉黑之后可确保24小时内不会再次取到此邮箱号。
|
||||
|
||||
|
||||
## 数据订阅推送
|
||||
|
||||
除了上述主动查询接口的方式获取验证码以外,如果您拥有支持公网访问的 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": 推送数据 } |
|
||||
|
||||
### 签名校验
|
||||
为了确保数据由本平台发出且未经篡改送达您的服务器, 请按照以下方式校验签名,抛弃签名不符的非法请求:
|
||||
|
||||
( <a href="https://admin.code92.top/profile/merchant" target="_blank">您的用户标识</a> + Header["CLOUD-CODE-TIMESTAMP"] + ReuqestBody ).MD5(UTF8) = Header["CLOUD-CODE-SIGN"]
|
||||
|
||||
例如您的用户标识为:26849160-3e36-46fb-b51c-2def0655f195
|
||||
|
||||
收到的请求时间戳为:1723276087
|
||||
|
||||
收到的请求内容为:{"name":"cloud-code"}
|
||||
|
||||
则签名串为
|
||||
```
|
||||
26849160-3e36-46fb-b51c-2def0655f1951723276087{"name":"cloud-code"}
|
||||
```
|
||||
经过md5哈希运算的签名值为:
|
||||
```
|
||||
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> |
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user