import{_ as e,c as l,b as t,a as d,d as n,e as o,w as p,r,o as c}from"./app-CDdN0tOz.js";const i={};function D(u,s){const a=r("RouteLink");return c(),l("div",null,[s[3]||(s[3]=t("h1",{id:"青少年模式",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#青少年模式"},[t("span",null,"青少年模式")])],-1)),s[4]||(s[4]=t("h2",{id:"开启-关闭",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#开启-关闭"},[t("span",null,"开启/关闭")])],-1)),s[5]||(s[5]=t("blockquote",null,[t("p",null,"https://app.bilibili.com/x/v2/account/teenagers/update")],-1)),s[6]||(s[6]=t("p",null,[t("em",null,"请求方式：POST")],-1)),t("p",null,[s[1]||(s[1]=n("认证方式：APP（详见")),o(a,{to:"/docs/misc/device_identity.html"},{default:p(()=>s[0]||(s[0]=[n("设备各类标识算法")])),_:1,__:[0]}),s[2]||(s[2]=n("）"))]),s[7]||(s[7]=d(`<p><strong>POST参数：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>appkey</td><td>str</td><td>APP密钥</td><td>APP必要</td><td></td></tr><tr><td>ts</td><td>num</td><td>当前时间戳</td><td>APP必要</td><td></td></tr><tr><td>sign</td><td>str</td><td>APP签名</td><td>APP必要</td><td></td></tr><tr><td>access_key</td><td>str</td><td>APP登录Token</td><td>APP必要</td><td></td></tr><tr><td>device_model</td><td>str</td><td>设备 Model</td><td>APP必要</td><td></td></tr><tr><td>channel</td><td>str</td><td>APP下载渠道</td><td>APP必要</td><td>比如yingyongbao</td></tr><tr><td>mobi_app</td><td>str</td><td>APP 包类型</td><td>APP必要</td><td></td></tr><tr><td>platform</td><td>str</td><td>平台类型</td><td>APP必要</td><td>android</td></tr><tr><td>c_locale</td><td>str</td><td>语言</td><td>非必要</td><td>zh_CN</td></tr><tr><td>s_locale</td><td>str</td><td>语言</td><td>非必要</td><td>zh_CN</td></tr><tr><td>statistics</td><td>str</td><td>?</td><td>必要</td><td>一般固定为{&quot;appId&quot;:1,&quot;platform&quot;:3,&quot;version&quot;:&quot;7.27.0&quot;,&quot;abtest&quot;:&quot;&quot;},非key-value入参需要转URL编码</td></tr><tr><td>pwd</td><td>num</td><td>密码</td><td>必要</td><td>开启时为4位，关闭时必须为空</td></tr><tr><td>teenagers_mode</td><td>num</td><td>开启/关闭模式</td><td>必要</td><td>0为开启，1为关闭</td></tr><tr><td>teenagers_status</td><td>num</td><td>当前模式状态</td><td>必要</td><td>0为已经开启，1为目前关闭</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：请求错误</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr></tbody></table><p><strong>示例：</strong> 关闭本账号的青少年模式（pwd=&amp;teenagers_mode=1&amp;teenagers_status=0）</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:#569CD6;"> --location</span><span style="color:#CE9178;"> &#39;https://app.bilibili.com/x/v2/account/teenagers/update&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Device-Id: 你的设备id&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Fp_local: 你的本地设备指纹&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Fp_remote: 你的远程设备指纹&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Session_id: 会话id&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;App-Key: android&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--header </span><span style="color:#CE9178;">&#39;Content-Type: application/x-www-form-urlencoded; charset=utf-8&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;access_key=你的access_key&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;appkey=1d8b6e7d45233436&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;build=6270200&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;c_locale=zh_CN&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;channel=yingyongbao&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;device_model=samsung%257CSM-G955N&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;mobi_app=android&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;platform=android&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;s_locale=zh_CN&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;statistics=%257B%2522appId%2522%253A1%252C%2522platform%2522%253A3%252C%2522version%2522%253A%25226.27.0%2522%252C%2522abtest%2522%253A%2522%2522%257D&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;pwd=&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;teenagers_mode=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;teenagers_status=0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;ts=1699301298&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;sign=0666c38cb79691c4a0d9570a0669ec96&#39;</span><span style="color:#D7BA7D;"> \\</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></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;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>
<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></div><p>pwd有数值时</p><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;">-400</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;关闭时密码必须为空&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>
<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></div></details>`,8))])}const m=e(i,[["render",D]]),b=JSON.parse('{"path":"/docs/teenager/teenager_mode.html","title":"青少年模式","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1706520417000,"contributors":[{"name":"hd80606b","username":"hd80606b","email":"42578272+hd80606b@users.noreply.github.com","commits":1,"url":"https://github.com/hd80606b"},{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":1,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"12e014afcb376e0314e0fdef2dab5c4f7b9fdde7","time":1706520417000,"email":"102411014+SessionHu@users.noreply.github.com","author":"Session小胡","message":"fix: 错误的显示和链接和数据类型 (#954)"},{"hash":"d0f6de0b4fde3d3cfed49b0a5c5bb423de140ab6","time":1705054124000,"email":"42578272+hd80606b@users.noreply.github.com","author":"hd80606b","message":"新增私信消息记录参数，新增青少年模式接口 (#935)"}]},"filePathRelative":"docs/teenager/teenager_mode.md"}');export{m as comp,b as data};
