Skip to content

发送短信验证码 ​

POST /sms-verifications

权限范围幂等operationId
sms:send本身幂等Sms_send

限频:同手机号 1 次/分钟、10 次/天;同应用 30 次/分钟、2000 次/天。验证码 5 分钟过期,错 5 次作废。测试凭证不真发,验证码固定为 246810。

幂等:本身幂等,重复调用结果相同。

请求体 ​

SendCode ​

字段类型必填说明
phonestring是手机号(11 位中国大陆手机号)
scenestring是你自己的场景标识(如 bind_account),小写字母数字下划线

示例 ​

js
const res = await client.post("/sms-verifications", {
  "phone": "13812345678",
  "scene": "string"
});
http
POST /open/v1/sms-verifications HTTP/1.1
Host: api.sybb.pw
Authorization: SY-HMAC-SHA256 Credential=ak_…, Timestamp=1796035200, Nonce=…, Signature=…
Content-Type: application/json

{
  "phone": "13812345678",
  "scene": "string"
}

响应 200:

json
{
  "verificationId": "x_10mqM3VYAvwjmpicxAlp26c",
  "expiresAt": "2026-11-30T20:15:00+08:00"
}

响应 ​

Sent ​

字段类型必填说明
verificationIdstring验证码发送记录 ID,校验时传回
expiresAtstring时间(RFC 3339)

错误 ​

HTTP错误码含义
429SMS_RATE_LIMITED短信发送太频繁
422BUSINESS_RULE业务规则不满足

签名、权限、限流等通用错误见错误处理。

ByteForge · 神运开放平台接口地址 https://api.sybb.pw/open/v1