将登录 token 写入本地外壳和前端登录态,写入成功后会刷新当前页面。
基本信息
Path: /uploadToken
Method: POST
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
token | string | 是 | 登录 token。 |
补充说明
该接口会调用 window.setToken 或 chrome.setToken,然后执行页面刷新。
用于外部程序把认证信息同步给稳卖 AI 浏览器页面。
请求示例
{
"method": "uploadToken",
"token": "USER_LOGIN_TOKEN"
}
成功返回示例
{
"method": "uploadToken",
"response": {
"code": 200,
"msg": "success"
}
}
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
response.code | number | 200 表示写入成功。 |
response.msg | string | 固定返回 success。 |
失败返回示例
{
"method": "uploadToken",
"status": "error",
"code": "400",
"msg": "token 写入失败"
}