跳转到主要内容
POST
登录

请求体

application/json
org
string
必填

CBPay 组织 slug(cbpay)。

email
string<email>
必填
password
string
必填

响应

已签发会话——或者,当账户策略要求登录 OTP 时,返回带 otp_required true 和 pending_token 的中间响应,在 POST /v1/auth/login/otp 交换。

access_token
string
expires_at
string<date-time>
refresh_token
string

一次性轮换刷新令牌(rt_…),可在 POST /v1/auth/refresh 免重新登录续期会话。

refresh_expires_at
string<date-time>
account_id
string<uuid>
role
enum<string>
可用选项:
owner,
operator,
viewer
otp_required
boolean

当登录需要第二步时为 true。

pending_token
string

用于 POST /v1/auth/login/otp 的中间令牌。它无法对 API 请求进行认证。

challenge_id
string<uuid>
channel
enum<string>

登录质询的实际渠道。手机号处于绑定冷却期时,质询会自动改用更强的因素(身份验证器应用,其次登录邮箱)——验证码绝不会发送到最近绑定且未验证的号码。

可用选项:
sms,
whatsapp,
email,
totp
phone
string

验证码发送到的打码手机号。

最后修改于 2026年7月19日