自助注销挑战(JWT 登录态,PAT 恒 403):向账户邮箱发 OTP 确认码,返回一次性挑战 id(TTL 同 OTP);频控 = 每 IP 认证严档 + per-email 送信预算(与登录 OTP 共享 otpRate 桶,档位对齐)
POST
/v1/account/anonymize/challenge
const url = 'https://api.tansr.com/v1/account/anonymize/challenge';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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/account/anonymize/challenge \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”挑战已发({challengeId, expiresInSec})
Media typeapplication/json
object
challengeId
required
一次性挑战 id(TTL 同 OTP;确认端点回传)
string
expiresInSec
required
挑战有效期(秒)
integer
Examplegenerated
{ "challengeId": "example", "expiresInSec": 1}Unauthorized(未认证/已注销主体)
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" }}Forbidden(PAT 主体;须登录态 JWT)
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(per-email 送信预算)/ 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" }}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。