OTP 校验换 token(首次即注册;每 IP 认证严档)
POST
/v1/auth/otp/verify
const url = 'https://api.tansr.com/v1/auth/otp/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","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/otp/verify \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "code": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
code
required
string
Examplegenerated
{ "email": "hello@example.com", "code": "example"}Responses
Section titled “Responses”Token
Otp_invalid
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" }}Otp_rate_limited(尝试超限)/ rate_limited(每 IP 认证严档,T-A28)
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" }}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。