import{_ as s,c as e,a,o}from"./app-Dgsdh8A6.js";const l={};function n(d,t){return o(),e("div",null,t[0]||(t[0]=[a(`

退出账号登录

退出登录(web端)

https://passport.bilibili.com/login/exit/v2

请求方式:POST

认证方式:Cookie

验证登录成功后会使用set-cookie字段清空以下 cookie 项:

DedeUserID DedeUserID__ckMd5 SESSDATA bili_jct

并在服务器注销该登录 Token (SESSDATA),该 Token 即失效

请求必须包含以下cookie项:DedeUserID bili_jct SESSDATA

正文参数 (application/x-www-form-urlencoded):

参数名类型内容必要性备注
biliCSRFstrCSRF Token (位于 cookie 中的 bili_jct)必要
gourlstr成功后跳转到的页面非必要默认为javascript:history.go(-1)

json 回复:

如果 cookie 已经失效则输出登录页 html

根对象:

字段类型内容备注
codenum返回值0:成功
2202:csrf 请求非法
statusbool返回值true:成功
tsnum时间戳
messagestr错误信息成功时不存在
data有效时:obj信息本体失败时不存在

data对象:

字段类型内容备注
redirectUrlstr重定向 url

示例:

curl -L -X POST 'https://passport.bilibili.com/login/exit/v2' \\
-H 'Cookie: DedeUserID=xxx; bili_jct=xxx; SESSDATA=xxx' \\
-H 'Content-Type: application/x-www-form-urlencoded' \\
--data-urlencode 'biliCSRF=xxxxxx'
查看响应示例:
{
  "code": 0,
  "status": true,
  "ts": 1663034005,
  "data": {
    "redirectUrl": "https://passport.biligame.com/crossDomain?DedeUserID=&DedeUserID__ckMd5=&SESSDATA=&bili_jct=&gourl=javascript%3Ahistory.go%28-1%29"
  }
}
`,20)]))}const c=s(l,[["render",n]]),i=JSON.parse('{"path":"/docs/login/exit.html","title":"退出账号登录","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1677124138000,"contributors":[{"name":"SocialSisterYi","username":"SocialSisterYi","email":"1440239038@qq.com","commits":2,"url":"https://github.com/SocialSisterYi"}],"changelog":[{"hash":"f6760f4be38d5b592d396b211e48c666286524de","time":1677124138000,"email":"1440239038@qq.com","author":"SocialSisterYi","message":"🔨remove header index"},{"hash":"7d89ece2ac46425810647c4ac92acf5f3721cb68","time":1676998806000,"email":"1440239038@qq.com","author":"SocialSisterYi","message":"🚀调整项目结构"}]},"filePathRelative":"docs/login/exit.md"}');export{c as comp,i as data};