docs: 集成短信宝 SMS Bao 验证码服务
- 新增 docs/smsbao-integration.md(完整集成文档+代码示例) - 更新 PRD:注册/登录使用短信宝发送验证码 - 更新架构设计:技术栈+选型矩阵+配置说明 - 更新 API 规范:新增 /send-code 接口 - 更新 AGENTS.md:短信服务配置说明 短信宝 API: - 发送: GET https://api.smsbao.com/sms?u=&p=&m=&c= - 查询: GET http://api.smsbao.com/query?u=&p= - 签名格式: 【QihuAI】您的验证码是123456
This commit is contained in:
1 parent
d45410abef
commit
a9e141b695
5 files changed
+356
-6
No files matched your search
+23
-3
@@ -46,9 +46,29 @@
|
||||
|
||||
## 2. 认证接口(Casdoor 代理)
|
||||
|
||||
### POST /api/v1/auth/send-code
|
||||
```yaml
|
||||
description: 发送手机验证码(短信宝 SMS Bao)
|
||||
request:
|
||||
body:
|
||||
phone: string (required)
|
||||
captcha_id: string (required) # 图形验证码ID
|
||||
captcha_code: string (required) # 图形验证码答案
|
||||
response:
|
||||
200:
|
||||
data:
|
||||
message: "验证码已发送"
|
||||
400:
|
||||
code: 40001
|
||||
message: "图形验证码错误"
|
||||
429:
|
||||
code: 42901
|
||||
message: "发送太频繁,请60秒后重试"
|
||||
```
|
||||
|
||||
### POST /api/v1/auth/register
|
||||
```yaml
|
||||
description: 注册(手机号 + 验证码)
|
||||
description: 注册(手机号 + 短信验证码)
|
||||
request:
|
||||
body:
|
||||
phone: string (required)
|
||||
@@ -64,11 +84,11 @@ response:
|
||||
|
||||
### POST /api/v1/auth/login
|
||||
```yaml
|
||||
description: 登录(手机号 + 验证码)
|
||||
description: 登录(手机号 + 短信验证码)
|
||||
request:
|
||||
body:
|
||||
phone: string (required)
|
||||
code: string (required)
|
||||
code: string (required, 6位验证码)
|
||||
response:
|
||||
200:
|
||||
data:
|
||||
|
||||
Reference in new issue
Block a user