Documentation Index
Fetch the complete documentation index at: https://docs.mirobody.ai/llms.txt
Use this file to discover all available pages before exploring further.
access_token 30 天有效;客户端应在 过期前 24 小时内 主动续期,避免 401 中断业务。
端点
注意:本端点用 OAuth 2.0 标准 form 编码,不是 JSON;client_id 字段必填(邮箱登录场景下可填任意非空字符串作为客户端标识,例如 app 包名)。
响应
OAuth 2.0 标准格式:- HTTP 200 表示成功。
- HTTP 401
expired_token表示refresh_token已过期或被吊销,应清掉本地 token 重走 邮箱登录。 - 每次续期会同时下发新的
access_token和refresh_token,客户端应全部替换为新值。
错误响应
invalid_client— 缺client_id。expired_token— refresh_token 过期。invalid_grant— refresh_token 不合法。
客户端策略建议
- 本地缓存 access_token 与 expires_in;当剩余有效期 < 24h 时主动调本端点续期。
- 收到 401 时先尝试用 refresh_token 续期一次;仍失败再清本地 token 重新登录。