import{_ as p,c as d,b as s,a as o,e as t,w as e,d as l,r,o as i}from"./app-CDdN0tOz.js";const c={};function D(u,n){const a=r("RouteLink");return i(),d("div",null,[n[46]||(n[46]=s("h1",{id:"短信登录",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#短信登录"},[s("span",null,"短信登录")])],-1)),n[47]||(n[47]=s("p",null,"web端短信登录流程：",-1)),s("ol",null,[s("li",null,[t(a,{to:"/docs/login/login_action/"},{default:e(()=>n[0]||(n[0]=[l("完成人机验证")])),_:1,__:[0]})]),n[1]||(n[1]=o("<li>发送短信，使用国际地区代码<code>cid</code>+手机号码<code>tel</code>+登录密钥<code>token</code>+极验<code>challenge</code>+验证结果<code>validate</code>+验证结果<code>seccode</code></li><li>提交短信验证码以验证登录操作，使用国际地区代码<code>cid</code>+手机号码<code>tel</code>+短信验证码<code>code</code></li>",2))]),n[48]||(n[48]=o(`<h2 id="获取国际冠字码-web端" tabindex="-1"><a class="header-anchor" href="#获取国际冠字码-web端"><span>获取国际冠字码_web端</span></a></h2><blockquote><p>https://passport.bilibili.com/web/generic/country/list</p></blockquote><p><em>请求方式：GET</em></p><p><strong>json回复：</strong></p><p>根对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0：成功</td></tr><tr><td>data</td><td>obj</td><td>数据本体</td><td></td></tr></tbody></table><p><code>data</code>对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>common</td><td>array</td><td>常用国家&amp;地区</td><td></td></tr><tr><td>others</td><td>array</td><td>其他国家&amp;地区</td><td></td></tr></tbody></table><p><code>data</code>中的<code>common</code>和<code>others</code>数组：</p><table><thead><tr><th>项</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>obj</td><td>国家&amp;地区1</td><td></td></tr><tr><td>n</td><td>obj</td><td>国家&amp;地区(n+1)</td><td></td></tr><tr><td>……</td><td>obj</td><td>……</td><td>……</td></tr></tbody></table><p><code>common</code>和<code>others</code>数组中的对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>num</td><td>国际代码值</td><td></td></tr><tr><td>cname</td><td>str</td><td>国家&amp;地区名</td><td></td></tr><tr><td>country_id</td><td>str</td><td>国家&amp;地区区号</td><td></td></tr></tbody></table><p><strong>示例：</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://passport.bilibili.com/web/generic/country/list&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><details><summary>查看响应示例：</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;common&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">            {</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;cname&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;中国大陆&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;country_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;86&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">            },</span></span>
<span class="line"><span style="color:#D4D4D4;">            {</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">5</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;cname&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;中国香港特别行政区&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;country_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;852&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">            },</span></span>
<span class="line"><span style="color:#F44747;">            …………</span></span>
<span class="line"><span style="color:#D4D4D4;">        ],</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;others&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">            {</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">22</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;cname&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;阿富汗&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;country_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;93&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">            },</span></span>
<span class="line"><span style="color:#D4D4D4;">            {</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">20</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;cname&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;阿尔巴尼亚&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">                &quot;country_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;355&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">            },</span></span>
<span class="line"><span style="color:#F44747;">            …………</span></span>
<span class="line"><span style="color:#D4D4D4;">        ]</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="发送短信验证码-app端" tabindex="-1"><a class="header-anchor" href="#发送短信验证码-app端"><span>发送短信验证码_app端</span></a></h2><blockquote><p>https://passport.bilibili.com/x/passport-login/sms/send</p></blockquote><p><em>请求方式：POST</em></p><p>同手机号短信发送 CD 时间为 60s</p><p>短信验证码 timeout 为 5min</p><p>验证内容由第一次返回进行处理,解析recaptcha_url的params传到极验进行验证后取到验证结果入参后再次调用即可</p><p><strong>正文参数 (application/x-www-form-urlencoded)：</strong></p>`,22)),s("table",null,[n[25]||(n[25]=s("thead",null,[s("tr",null,[s("th",null,"参数名"),s("th",null,"类型"),s("th",null,"内容"),s("th",null,"必要性"),s("th",null,"备注")])],-1)),s("tbody",null,[n[16]||(n[16]=s("tr",null,[s("td",null,"cid"),s("td",null,"num"),s("td",null,"国际冠字码"),s("td",null,"必要"),s("td",null,[l("可以从"),s("a",{href:"#%E8%8E%B7%E5%8F%96%E5%9B%BD%E9%99%85%E5%86%A0%E5%AD%97%E7%A0%81-web%E7%AB%AF"},"获取国际冠字码"),l("获取")])],-1)),n[17]||(n[17]=s("tr",null,[s("td",null,"tel"),s("td",null,"num"),s("td",null,"手机号码"),s("td",null,"必要"),s("td")],-1)),n[18]||(n[18]=s("tr",null,[s("td",null,"login_session_id"),s("td",null,"str"),s("td",null,"登录标识"),s("td",null,"必要"),s("td",null,"uuid去掉'-'后得到")],-1)),s("tr",null,[n[5]||(n[5]=s("td",null,"recaptcha_token",-1)),n[6]||(n[6]=s("td",null,"str",-1)),n[7]||(n[7]=s("td",null,"登录 API token",-1)),n[8]||(n[8]=s("td",null,"必要",-1)),s("td",null,[n[3]||(n[3]=l("在")),t(a,{to:"/docs/login/login_action/#%E7%94%B3%E8%AF%B7captcha%E9%AA%8C%E8%AF%81%E7%A0%81"},{default:e(()=>n[2]||(n[2]=[l("申请 captcha 验证码")])),_:1,__:[2]}),n[4]||(n[4]=l("接口处获取"))])]),s("tr",null,[n[12]||(n[12]=s("td",null,"gee_challenge",-1)),n[13]||(n[13]=s("td",null,"str",-1)),n[14]||(n[14]=s("td",null,"极验 challenge",-1)),n[15]||(n[15]=s("td",null,"必要",-1)),s("td",null,[n[10]||(n[10]=l("在")),t(a,{to:"/docs/login/login_action/#%E7%94%B3%E8%AF%B7captcha%E9%AA%8C%E8%AF%81%E7%A0%81"},{default:e(()=>n[9]||(n[9]=[l("申请 captcha 验证码")])),_:1,__:[9]}),n[11]||(n[11]=l("接口处获取"))])]),n[19]||(n[19]=s("tr",null,[s("td",null,"gee_validate"),s("td",null,"str"),s("td",null,"极验 result"),s("td",null,"必要"),s("td",null,"极验验证后得到")],-1)),n[20]||(n[20]=s("tr",null,[s("td",null,"gee_seccode"),s("td",null,"str"),s("td",null,[l("极验 result +"),s("code",null,"|jordan")]),s("td",null,"必要"),s("td",null,"极验验证后得到")],-1)),n[21]||(n[21]=s("tr",null,[s("td",null,"channel"),s("td",null,"str"),s("td",null,"通道?"),s("td",null,"必要"),s("td",null,'一般固定值为"bili"')],-1)),n[22]||(n[22]=s("tr",null,[s("td",null,"buvid"),s("td",null,"str"),s("td",null,"buvid"),s("td",null,"必要"),s("td",null,"参考如下方法生成")],-1)),n[23]||(n[23]=s("tr",null,[s("td",null,"local_id"),s("td",null,"str"),s("td",null,"同上"),s("td",null,"必要"),s("td",null,"同上")],-1)),n[24]||(n[24]=s("tr",null,[s("td",null,"statistics"),s("td",null,"str"),s("td",null,"?"),s("td",null,"必要"),s("td",null,'一般固定为{"appId":1,"platform":3,"version":"7.27.0","abtest":""},非key-value入参需要转URL编码')],-1))])]),n[49]||(n[49]=o(`<p><strong>json回复：</strong></p><p>根对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0：成功<br>-400：请求错误<br>1002：手机号格式错误<br>86203：短信发送次数已达上限<br>1003：验证码已经发送<br>1025：该手机号在哔哩哔哩有过永久封禁记录，无法再次注册或绑定新账号<br>2400：登录秘钥错误<br>2406：验证极验服务出错</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>成功为0</td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code>对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>captcha_key</td><td>str</td><td>短信登录 token</td><td>在下方传参时需要，请备用</td></tr></tbody></table><p><strong>示例：</strong></p><p>例如手机号为<code>13888888888</code>，国际id为<code>1 (中国大陆)</code>，登录秘钥为<code>aabbccdd</code>，极验challenge为<code>2333</code>，极验结果为<code>666666</code>，进行发送短信验证码操作</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://passport.bilibili.com/x/passport-login/sms/send&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;tel=13888888888&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;cid=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;login_session_id=669900&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;recaptcha_token=aabbccdd&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;gee_challenge=2333&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;gee_validate=666666&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;gee_seccode=666666|jordan&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;channel=bili&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;buvid=999999&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;local_id=999999&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;statistics=%7B%22appId%22%3A1%2C%22platform%22%3A3%2C%22version%22%3A%227.27.0%22%2C%22abtest%22%3A%22%22%7D&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>生成buvid方法</p><div class="language-javascript line-numbers-mode" data-highlighter="shiki" data-ext="javascript" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-javascript"><span class="line"><span style="color:#9CDCFE;">static</span><span style="color:#DCDCAA;"> buvid</span><span style="color:#D4D4D4;">() : </span><span style="color:#9CDCFE;">string</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#569CD6;">    var</span><span style="color:#9CDCFE;"> mac</span><span style="color:#D4D4D4;"> = [];</span></span>
<span class="line"><span style="color:#C586C0;">    for</span><span style="color:#D4D4D4;"> (</span><span style="color:#569CD6;">let</span><span style="color:#9CDCFE;"> i</span><span style="color:#D4D4D4;"> = </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">; </span><span style="color:#9CDCFE;">i</span><span style="color:#D4D4D4;"> &lt; </span><span style="color:#B5CEA8;">6</span><span style="color:#D4D4D4;">; </span><span style="color:#9CDCFE;">i</span><span style="color:#D4D4D4;">++) {</span></span>
<span class="line"><span style="color:#569CD6;">        var</span><span style="color:#9CDCFE;"> min</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">Math</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">min</span><span style="color:#D4D4D4;">(</span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">, </span><span style="color:#B5CEA8;">0xff</span><span style="color:#D4D4D4;">)</span></span>
<span class="line"><span style="color:#569CD6;">        var</span><span style="color:#9CDCFE;"> max</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">Math</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">max</span><span style="color:#D4D4D4;">(</span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">, </span><span style="color:#B5CEA8;">0xff</span><span style="color:#D4D4D4;">)</span></span>
<span class="line"><span style="color:#569CD6;">        var</span><span style="color:#9CDCFE;"> num</span><span style="color:#D4D4D4;"> = </span><span style="color:#DCDCAA;">parseInt</span><span style="color:#D4D4D4;">((</span><span style="color:#9CDCFE;">Math</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">random</span><span style="color:#D4D4D4;">() * (</span><span style="color:#9CDCFE;">min</span><span style="color:#D4D4D4;"> - </span><span style="color:#9CDCFE;">max</span><span style="color:#D4D4D4;"> + </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">) + </span><span style="color:#9CDCFE;">max</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">()).</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">(</span><span style="color:#B5CEA8;">16</span><span style="color:#D4D4D4;">)</span></span>
<span class="line"><span style="color:#9CDCFE;">        mac</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">push</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">num</span><span style="color:#D4D4D4;">)</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#569CD6;">    var</span><span style="color:#9CDCFE;"> md5</span><span style="color:#D4D4D4;"> = </span><span style="color:#569CD6;">this</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">md5</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">mac</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">join</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&#39;:&#39;</span><span style="color:#D4D4D4;">));</span></span>
<span class="line"><span style="color:#569CD6;">    var</span><span style="color:#9CDCFE;"> md5Arr</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">md5</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">split</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&#39;&#39;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">    return</span><span style="color:#CE9178;"> &quot;XY\${md5Arr[2]}\${md5Arr[12]}\${md5Arr[22]}\${md5}&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例：</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span><span style="color:#9CDCFE;">&quot;code&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;message&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;ttl&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;data&quot;</span><span style="color:#D4D4D4;">:{</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;captcha_key&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#CE9178;">&quot;7542f109c3318d74847626495c68c321&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;recaptcha_url&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#CE9178;">&quot;....&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="发送短信验证码-web端" tabindex="-1"><a class="header-anchor" href="#发送短信验证码-web端"><span>发送短信验证码_web端</span></a></h2><blockquote><p>https://passport.bilibili.com/x/passport-login/web/sms/send</p></blockquote><p><em>请求方式：POST</em></p><p>同手机号短信发送 CD 时间为 60s</p><p>短信验证码 timeout 为 5min</p><p><strong>正文参数 (application/x-www-form-urlencoded)：</strong></p>`,17)),s("table",null,[n[45]||(n[45]=s("thead",null,[s("tr",null,[s("th",null,"参数名"),s("th",null,"类型"),s("th",null,"内容"),s("th",null,"必要性"),s("th",null,"备注")])],-1)),s("tbody",null,[n[40]||(n[40]=s("tr",null,[s("td",null,"cid"),s("td",null,"num"),s("td",null,"国际冠字码"),s("td",null,"必要"),s("td",null,[l("可以从"),s("a",{href:"#%E8%8E%B7%E5%8F%96%E5%9B%BD%E9%99%85%E5%86%A0%E5%AD%97%E7%A0%81-web%E7%AB%AF"},"获取国际冠字码"),l("获取")])],-1)),n[41]||(n[41]=s("tr",null,[s("td",null,"tel"),s("td",null,"num"),s("td",null,"手机号码"),s("td",null,"必要"),s("td")],-1)),n[42]||(n[42]=s("tr",null,[s("td",null,"source"),s("td",null,"str"),s("td",null,"登录来源"),s("td",null,"必要"),s("td",null,[s("code",null,"main_web"),l("：独立登录页"),s("br"),s("code",null,"main_mini"),l("：小窗登录")])],-1)),s("tr",null,[n[29]||(n[29]=s("td",null,"token",-1)),n[30]||(n[30]=s("td",null,"str",-1)),n[31]||(n[31]=s("td",null,"登录 API token",-1)),n[32]||(n[32]=s("td",null,"必要",-1)),s("td",null,[n[27]||(n[27]=l("在")),t(a,{to:"/docs/login/login_action/#%E7%94%B3%E8%AF%B7captcha%E9%AA%8C%E8%AF%81%E7%A0%81"},{default:e(()=>n[26]||(n[26]=[l("申请 captcha 验证码")])),_:1,__:[26]}),n[28]||(n[28]=l("接口处获取"))])]),s("tr",null,[n[36]||(n[36]=s("td",null,"challenge",-1)),n[37]||(n[37]=s("td",null,"str",-1)),n[38]||(n[38]=s("td",null,"极验 challenge",-1)),n[39]||(n[39]=s("td",null,"必要",-1)),s("td",null,[n[34]||(n[34]=l("在")),t(a,{to:"/docs/login/login_action/#%E7%94%B3%E8%AF%B7captcha%E9%AA%8C%E8%AF%81%E7%A0%81"},{default:e(()=>n[33]||(n[33]=[l("申请 captcha 验证码")])),_:1,__:[33]}),n[35]||(n[35]=l("接口处获取"))])]),n[43]||(n[43]=s("tr",null,[s("td",null,"validate"),s("td",null,"str"),s("td",null,"极验 result"),s("td",null,"必要"),s("td",null,"极验验证后得到")],-1)),n[44]||(n[44]=s("tr",null,[s("td",null,"seccode"),s("td",null,"str"),s("td",null,[l("极验 result +"),s("code",null,"|jordan")]),s("td",null,"必要"),s("td",null,"极验验证后得到")],-1))])]),n[50]||(n[50]=o(`<p><strong>json回复：</strong></p><p>根对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0：成功<br>-400：请求错误<br>1002：手机号格式错误<br>86203：短信发送次数已达上限<br>1003：验证码已经发送<br>1025：该手机号在哔哩哔哩有过永久封禁记录，无法再次注册或绑定新账号<br>2400：登录秘钥错误<br>2406：验证极验服务出错</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>成功为0</td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code>对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>captcha_key</td><td>str</td><td>短信登录 token</td><td>在下方传参时需要，请备用</td></tr></tbody></table><p><strong>示例：</strong></p><p>例如手机号为<code>13888888888</code>，国际id为<code>1 (中国大陆)</code>，登录秘钥为<code>aabbccdd</code>，极验challenge为<code>2333</code>，极验结果为<code>666666</code>，进行发送短信验证码操作</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://passport.bilibili.com/x/passport-login/web/sms/send&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;tel=13888888888&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;cid=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;source=main_web&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;token=aabbccdd&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;challenge=2333&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;validate=666666&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;seccode=666666|jordan&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例：</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span><span style="color:#9CDCFE;">&quot;code&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;message&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;ttl&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;data&quot;</span><span style="color:#D4D4D4;">:{</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;captcha_key&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#CE9178;">&quot;7542f109c3318d74847626495c68c321&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="使用短信验证码登录-app端" tabindex="-1"><a class="header-anchor" href="#使用短信验证码登录-app端"><span>使用短信验证码登录_app端</span></a></h2><blockquote><p>https://passport.bilibili.com/x/passport-login/login/sms</p></blockquote><p><em>请求方式：POST</em></p><p>验证登录成功后会返回实体内容：</p><p><code>mid</code> <code>expires_in</code> <code>access_token</code> <code>refresh_token</code></p><p><strong>正文参数 (application/x-www-form-urlencoded)：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>cid</td><td>num</td><td>国际冠字码</td><td>必要</td><td>可以从<a href="#%E8%8E%B7%E5%8F%96%E5%9B%BD%E9%99%85%E5%86%A0%E5%AD%97%E7%A0%81-web%E7%AB%AF">获取国际冠字码</a>获取</td></tr><tr><td>tel</td><td>num</td><td>手机号码</td><td>必要</td><td></td></tr><tr><td>login_session_id</td><td>str</td><td>登录标识</td><td>必要</td><td>必须与上述login_session_id保持一致</td></tr><tr><td>code</td><td>num</td><td>短信验证码</td><td>必要</td><td>timeout 为 5min</td></tr><tr><td>captcha_key</td><td>str</td><td>短信登录 token</td><td>必要</td><td>从<a href="#%E5%8F%91%E9%80%81%E7%9F%AD%E4%BF%A1%E9%AA%8C%E8%AF%81%E7%A0%81-web%E7%AB%AF">上述API</a>请求成功后返回</td></tr></tbody></table><p><strong>json回复：</strong></p><p>根对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0：成功<br>-400：请求错误<br>1006：请输入正确的短信验证码<br>1007：短信验证码已过期</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code>对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>mid</td><td>str</td><td>用户uid</td><td></td></tr><tr><td>expires_in</td><td>str</td><td>过时时间</td><td></td></tr><tr><td>access_token</td><td>str</td><td>登录 token</td><td></td></tr><tr><td>refresh_token</td><td>str</td><td>刷新 token</td><td></td></tr><tr><td>cookie_info</td><td>Array</td><td>cookie集合</td><td></td></tr></tbody></table><p><strong>示例：</strong></p><p>使用手机号<code>13888888888</code>，短信验证码为<code>123456</code>，进行验证登录操作</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://passport.bilibili.com/x/passport-login/login/sms&#39;</span><span style="color:#D4D4D4;"> </span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;cid=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;tel=13888888888&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;code=123456&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;captcha_key=999999&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;login_session_id=669900&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例：</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;token_info&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;mid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;...&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;expires_in&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;114514&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;access_token&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;refresh_token&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#6A9955;">        //...</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;cookie_info&quot;</span><span style="color:#D4D4D4;">:[</span></span>
<span class="line"><span style="color:#6A9955;">        //...</span></span>
<span class="line"><span style="color:#D4D4D4;">    ],</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><p><strong>响应头部抓包信息：</strong></p><p>可明显看见设置了几个cookie（填入浏览器即可成功登录）</p><details><summary>查看响应示例：</summary><div class="language-http line-numbers-mode" data-highlighter="shiki" data-ext="http" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-http"><span class="line"><span style="color:#569CD6;">HTTP</span><span style="color:#D4D4D4;">/</span><span style="color:#B5CEA8;">1.1</span><span style="color:#B5CEA8;"> 200</span><span style="color:#CE9178;"> OK</span></span>
<span class="line"><span style="color:#569CD6;">Date:</span><span style="color:#CE9178;"> Mon, 13 Jul 2020 09:57:33 GMT</span></span>
<span class="line"><span style="color:#569CD6;">Content-Type:</span><span style="color:#CE9178;"> application/json;charset=UTF-8</span></span>
<span class="line"><span style="color:#569CD6;">Content-Length:</span><span style="color:#CE9178;"> 78</span></span>
<span class="line"><span style="color:#569CD6;">Connection:</span><span style="color:#CE9178;"> keep-alive</span></span>
<span class="line"><span style="color:#569CD6;">Server:</span><span style="color:#CE9178;"> Apache-Coyote/1.1</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> DedeUserID=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> DedeUserID__ckMd5=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> SESSDATA=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/; HttpOnly</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> bili_jct=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> sid=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/</span></span>
<span class="line"><span style="color:#569CD6;">Expires:</span><span style="color:#CE9178;"> Mon, 13 Jul 2020 09:57:32 GMT</span></span>
<span class="line"><span style="color:#569CD6;">Cache-Control:</span><span style="color:#CE9178;"> no-cache</span></span>
<span class="line"><span style="color:#569CD6;">X-Cache-Webcdn:</span><span style="color:#CE9178;"> BYPASS from jd-sxhz-dx-w-01</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="使用短信验证码登录-web端" tabindex="-1"><a class="header-anchor" href="#使用短信验证码登录-web端"><span>使用短信验证码登录_web端</span></a></h2><blockquote><p>https://passport.bilibili.com/x/passport-login/web/login/sms</p></blockquote><p><em>请求方式：POST</em></p><p>验证登录成功后会进行设置以下cookie项：</p><p><code>DedeUserID</code> <code>DedeUserID__ckMd5</code> <code>SESSDATA</code> <code>bili_jct</code></p><p><strong>正文参数 (application/x-www-form-urlencoded)：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>cid</td><td>num</td><td>国际冠字码</td><td>必要</td><td>可以从<a href="#%E8%8E%B7%E5%8F%96%E5%9B%BD%E9%99%85%E5%86%A0%E5%AD%97%E7%A0%81-web%E7%AB%AF">获取国际冠字码</a>获取</td></tr><tr><td>tel</td><td>num</td><td>手机号码</td><td>必要</td><td></td></tr><tr><td>code</td><td>num</td><td>短信验证码</td><td>必要</td><td>timeout 为 5min</td></tr><tr><td>source</td><td>str</td><td>登录来源</td><td>必要</td><td><code>main_web</code>：独立登录页<br><code>main_mini</code>：小窗登录</td></tr><tr><td>captcha_key</td><td>str</td><td>短信登录 token</td><td>必要</td><td>从<a href="#%E5%8F%91%E9%80%81%E7%9F%AD%E4%BF%A1%E9%AA%8C%E8%AF%81%E7%A0%81-web%E7%AB%AF">上述API</a>请求成功后返回</td></tr><tr><td>go_url</td><td>str</td><td>跳转url</td><td>非必要</td><td>默认为 https://www.bilibili.com</td></tr><tr><td>keep</td><td>bool</td><td>是否记住登录</td><td>非必要</td><td><code>true</code>：记住登录<br><code>false</code>：不记住登录</td></tr></tbody></table><p><strong>json回复：</strong></p><p>根对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0：成功<br>-400：请求错误<br>1006：请输入正确的短信验证码<br>1007：短信验证码已过期</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code>对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>is_new</td><td>bool</td><td>是否为新注册用户</td><td>false：非新注册用户<br>true：新注册用户</td></tr><tr><td>status</td><td>num</td><td>0</td><td>未知，可能0就是成功吧</td></tr><tr><td>url</td><td>str</td><td>跳转 url</td><td>默认为 https://www.bilibili.com</td></tr></tbody></table><p><strong>示例：</strong></p><p>使用手机号<code>13888888888</code>，短信验证码为<code>123456</code>，进行验证登录操作</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://passport.bilibili.com/x/passport-login/web/login/sms&#39;</span><span style="color:#D4D4D4;"> </span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;cid=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;tel=13888888888&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;code=123456&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例：</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;is_new&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">false</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;status&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://space.bilibili.com&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><p><strong>响应头部抓包信息：</strong></p><p>可明显看见设置了几个cookie（填入浏览器即可成功登录）</p><details><summary>查看响应示例：</summary><div class="language-http line-numbers-mode" data-highlighter="shiki" data-ext="http" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-http"><span class="line"><span style="color:#569CD6;">HTTP</span><span style="color:#D4D4D4;">/</span><span style="color:#B5CEA8;">1.1</span><span style="color:#B5CEA8;"> 200</span><span style="color:#CE9178;"> OK</span></span>
<span class="line"><span style="color:#569CD6;">Date:</span><span style="color:#CE9178;"> Mon, 13 Jul 2020 09:57:33 GMT</span></span>
<span class="line"><span style="color:#569CD6;">Content-Type:</span><span style="color:#CE9178;"> application/json;charset=UTF-8</span></span>
<span class="line"><span style="color:#569CD6;">Content-Length:</span><span style="color:#CE9178;"> 78</span></span>
<span class="line"><span style="color:#569CD6;">Connection:</span><span style="color:#CE9178;"> keep-alive</span></span>
<span class="line"><span style="color:#569CD6;">Server:</span><span style="color:#CE9178;"> Apache-Coyote/1.1</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> DedeUserID=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> DedeUserID__ckMd5=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> SESSDATA=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/; HttpOnly</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> bili_jct=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/</span></span>
<span class="line"><span style="color:#569CD6;">Set-Cookie:</span><span style="color:#CE9178;"> sid=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/</span></span>
<span class="line"><span style="color:#569CD6;">Expires:</span><span style="color:#CE9178;"> Mon, 13 Jul 2020 09:57:32 GMT</span></span>
<span class="line"><span style="color:#569CD6;">Cache-Control:</span><span style="color:#CE9178;"> no-cache</span></span>
<span class="line"><span style="color:#569CD6;">X-Cache-Webcdn:</span><span style="color:#CE9178;"> BYPASS from jd-sxhz-dx-w-01</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,47))])}const m=p(c,[["render",D]]),b=JSON.parse('{"path":"/docs/login/login_action/SMS.html","title":"短信登录","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1745426370000,"contributors":[{"name":"SocialSisterYi","username":"SocialSisterYi","email":"1440239038@qq.com","commits":2,"url":"https://github.com/SocialSisterYi"},{"name":"Ding","username":"Ding","email":"michael19950415@outlook.com","commits":1,"url":"https://github.com/Ding"},{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":1,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"d5cfe489b903dd9cdbb5390750d88f8a9c89436b","time":1745426370000,"email":"102411014+SessionHu@users.noreply.github.com","author":"SessionHu","message":"fixlogin/login_action/SMS.md): broken links"},{"hash":"8e2a4a9025e8fc22d6ab78f9434c2f49d7119d08","time":1685068383000,"email":"michael19950415@outlook.com","author":"Ding","message":"添加app短信登录接口 (#685)"},{"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/login_action/SMS.md"}');export{m as comp,b as data};
