短信 OTP 校验换 token(验码通过 → 已绑号登录签 JWT / 新号建户[phone_otp 身份,手机号唯一,与邮箱账户同人双标识恒不裂户]+签 JWT;失败计数窗随码 TTL,超限废码 429,循邮箱 OTP 爆破防护先例)
POST
/v1/auth/sms/verify
const url = 'https://api.tansr.com/v1/auth/sms/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"phone":"example","code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tansr.com/v1/auth/sms/verify \ --header 'Content-Type: application/json' \ --data '{ "phone": "example", "code": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
phone
required
string
code
required
string
Examplegenerated
{ "phone": "example", "code": "example"}Responses
Section titled “Responses”Token
短信通道未交割或平台配置缺席(fail-closed)
Media typeapplication/json
object
error
required
object
code
required
错误码注册表单源派生(src/http/errors.ts ERROR_CODES;码稳定,消费方按码翻译)
string
message
required
string
requestId
required
string
detail
object
Example
{ "error": { "code": "adjudicator_not_authorized" }}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。