import{_ as o,c as p,a as l,b as t,d as n,e,w as d,r,o as i}from"./app-Dgsdh8A6.js";const c={};function u(D,s){const a=r("RouteLink");return i(),p("div",null,[s[14]||(s[14]=l(`<h1 id="发布动态" tabindex="-1"><a class="header-anchor" href="#发布动态"><span>发布动态</span></a></h1><h2 id="为图片动态上传图片" tabindex="-1"><a class="header-anchor" href="#为图片动态上传图片"><span>为图片动态上传图片</span></a></h2><blockquote><p>https://api.bilibili.com/x/dynamic/feed/draw/upload_bfs</p></blockquote><p><em>请求方法: POST</em></p><p>认证方式: Cookie (SESSDATA)</p><p>注意: 非日常类型像素宽高必须大于 420</p><p><strong>正文参数 (multipart/form-data):</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>file_up</td><td>file</td><td>需要上传的图片文件</td><td>必要</td><td>格式仅支持 <code>jpg</code> <code>png</code> <code>gif</code></td></tr><tr><td>category</td><td>string</td><td>图片类型</td><td>不必要</td><td>daily: 日常 (动态) (默认)<br>draw: 绘画 (画友)<br>cos: 摄影 (COSPLAY)</td></tr><tr><td>biz</td><td>string</td><td></td><td>不必要</td><td><code>new_dyn</code></td></tr><tr><td>csrf</td><td>string</td><td>CSRF Token (即 Cookie 中 bili_jct)</td><td>必要</td><td></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>number</td><td>返回值</td><td>0: 成功<br>4100001: 参数错误<br>-101: 账号未登录</td></tr><tr><td>message</td><td>string</td><td>错误信息</td><td>默认为 <code>0</code></td></tr><tr><td>data</td><td>object</td><td>信息本体</td><td>成功时为有效信息</td></tr><tr><td>ttl</td><td>number</td><td><code>1</code></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>image_url</td><td>string</td><td>已上传图片 URL</td><td></td></tr><tr><td>image_width</td><td>number</td><td>已上传图片宽度</td><td>像素</td></tr><tr><td>image_height</td><td>number</td><td>已上传图片高度</td><td>像素</td></tr><tr><td>img_size</td><td>number</td><td>已上传图片大小</td><td>k</td></tr></tbody></table><p><strong>示例:</strong></p><p>上传图片 <code>test.png</code> 类型为 <code>日常</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://api.bilibili.com/x/dynamic/feed/draw/upload_bfs&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-F </span><span style="color:#CE9178;">&#39;file_up=@test.png&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-F </span><span style="color:#CE9178;">&#39;category=daily&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-F </span><span style="color:#CE9178;">&#39;csrf=xxxx&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&#39;SESSDATA=xxx&#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></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 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;image_url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;http://i0.hdslb.com/bfs/new_dyn/8ad5640045a114b62580614cb512bbc32095498218.png&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;image_width&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">73</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;image_height&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">71</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;img_size&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">6.261</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></div></details><h2 id="创建投票" tabindex="-1"><a class="header-anchor" href="#创建投票"><span>创建投票</span></a></h2><blockquote><p>https://api.vc.bilibili.com/vote_svr/v1/vote_svr/create_vote</p></blockquote><p><em>请求方法: POST</em></p><p>认证方式: Cookie (SESSDATA)</p><p>注意: <code>options</code> 最少两个, 下标 <code>n</code> 从 <code>0</code> 开始</p><p><strong>正文参数 (multipart/form-data)：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>info[title]</td><td>string</td><td>投票标题</td><td>必要</td><td></td></tr><tr><td>info[desc]</td><td>string</td><td>投票描述</td><td>非必要</td><td>可为空</td></tr><tr><td>info[type]</td><td>number</td><td>投票类型</td><td>必要</td><td>0: 文字投票<br>1: 图片投票</td></tr><tr><td>info[choice_cnt]</td><td>number</td><td>最多选几项</td><td>必要</td><td></td></tr><tr><td>info[duration]</td><td>number</td><td>投票持续秒数</td><td>必要</td><td>常用:<br>三天: 259200<br>七天: 604800<br>三十天: 2592000</td></tr><tr><td>info[options][ n ][desc]</td><td>string</td><td>第 n 项选项文字内容</td><td>必要</td><td></td></tr><tr><td>info[options][ n ][img_url]</td><td>strin</td><td>第 n 项选项投票图片</td><td>非必要</td><td></td></tr><tr><td>csrf</td><td>string</td><td>CSRF Token (即 Cookie 中 bili_jct)</td><td>非必要</td><td></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>number</td><td>返回值</td><td>0：成功 <br>5100001: 参数错误</td></tr><tr><td>msg</td><td>string</td><td>错误信息</td><td>成功为空</td></tr><tr><td>message</td><td>string</td><td>错误信息</td><td>跟上面那个一模一样</td></tr><tr><td>data</td><td>object</td><td>信息本体</td><td>仅在正确时既<code>code=0</code>时为有效信息</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>vote_id</td><td>number</td><td>投票 id</td><td></td></tr><tr><td>_gt_</td><td>number</td><td>0</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><p>创建一个标题为 <code>是否自愿开学</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:#569CD6;"> -X</span><span style="color:#CE9178;"> POST</span><span style="color:#CE9178;"> &#39;https://api.vc.bilibili.com/vote_svr/v1/vote_svr/create_vote&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;info[title]=是否自愿开学&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;info[desc]=问卷调查:自愿开学&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;info[type]=0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;info[choice_cnt]=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;info[duration]=604800&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;info[options][0][desc]=自愿&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;info[options][1][desc]=不自愿&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&#39;SESSDATA=xxx&#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></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;msg&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;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;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;vote_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">4947171</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;_gt_&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</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></div></details><h2 id="发表纯文本动态" tabindex="-1"><a class="header-anchor" href="#发表纯文本动态"><span>发表纯文本动态</span></a></h2><blockquote><p>https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/create</p></blockquote><p><em>请求方法: POST</em></p><p>认证方式: Cookie (SESSDATA)</p><p><strong>正文参数 (multipart/form-data):</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>dynamic_id</td><td>number</td><td>0</td><td>必要</td><td></td></tr><tr><td>type</td><td>number</td><td>4</td><td>必要</td><td></td></tr><tr><td>rid</td><td>number</td><td>0</td><td>必要</td><td></td></tr><tr><td>content</td><td>string</td><td>动态内容</td><td>必要</td><td></td></tr><tr><td>up_choose_comment</td><td>number</td><td>0</td><td>非必要</td><td></td></tr><tr><td>up_close_comment</td><td>number</td><td>0</td><td>非必要</td><td></td></tr><tr><td>extension</td><td>json</td><td>位置信息</td><td>非必要</td><td></td></tr><tr><td>at_uids</td><td>string</td><td>动态中 at 到的用户的 uid</td><td>非必要</td><td>使用逗号<code>,</code>分隔</td></tr><tr><td>ctrl</td><td>array</td><td>特殊格式控制 (如 at 别人时的蓝字体和链接)</td><td>非必要</td><td></td></tr><tr><td>csrf_token</td><td>string</td><td>CSRF Token (即 Cookie 中 bili_jct)</td><td>非必要</td><td></td></tr><tr><td>csrf</td><td>string</td><td>CSRF Token (即 Cookie 中 bili_jct)</td><td>非必要</td><td></td></tr></tbody></table><p><code>extension</code> 参数值:</p><div class="language-jsonc line-numbers-mode" data-highlighter="shiki" data-ext="jsonc" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-jsonc"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;emoji_type&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;lbs_cfg&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;title&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;poi&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;156330200&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;show_title&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;type&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;address&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;location&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;lng&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#6A9955;">//显示的经度数值,</span></span>
<span class="line"><span style="color:#CE9178;">      &quot;lat&quot;</span><span style="color:#F44747;">:</span><span style="color:#6A9955;"> //显示的纬度数值</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;distance&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span></span>
<span class="line"><span style="color:#D4D4D4;">  },</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;flag_cfg&quot;</span><span style="color:#D4D4D4;">: {},</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;from_cfg&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;location&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;lat&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#6A9955;">//用户实际纬度数值,</span></span>
<span class="line"><span style="color:#CE9178;">      &quot;lng&quot;</span><span style="color:#F44747;">:</span><span style="color:#6A9955;"> //用户实际经度数值</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></div><p><code>ctrl</code> 数组中的对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>location</td><td>number</td><td>从全文第几个字开始变蓝</td><td></td></tr><tr><td>type</td><td>number</td><td>1</td><td>可能 1 代表链接到用户 mid</td></tr><tr><td>length</td><td>number</td><td>这一段变蓝多少字</td><td></td></tr><tr><td>data</td><td>string</td><td>链接目标</td><td>被 at 人的 mid</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>number</td><td>返回值</td><td>0: 成功</td></tr><tr><td>message</td><td>string</td><td>错误信息</td><td>成功为空</td></tr><tr><td>data</td><td>object</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>result</td><td>number</td><td>0</td><td></td></tr><tr><td>errmsg</td><td>string</td><td>像是服务器日志一样的东西</td><td></td></tr><tr><td>dynamic_id</td><td>number</td><td>动态 id</td><td></td></tr><tr><td>create_result</td><td>number</td><td>1</td><td></td></tr><tr><td>dynamic_id_str</td><td>string</td><td>动态 id</td><td>字符串格式</td></tr><tr><td>_gt_</td><td>number</td><td>0</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><details><summary>纯文本:</summary><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-bash"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/create&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;dynamic_id=0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;type=4&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;rid=0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;content=Hello Bug~&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;up_choose_comment=0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;up_close_comment=0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;extension={&quot;emoji_type&quot;:1,&quot;from&quot;:{&quot;emoji_type&quot;:1},&quot;flag_cfg&quot;:{}}&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;at_uids=&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;ctrl=[]&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;csrf_token=de2731532b4ab96bc8536da948932668&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">	--data-urlencode</span><span style="color:#CE9178;"> &#39;csrf=de2731532b4ab96bc8536da948932668&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    -b</span><span style="color:#CE9178;"> &#39;SESSDATA=******&#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 class="line-number"></div></div></div><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;msg&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;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;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;result&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;errmsg&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;; Create dynamic:588320531406678918, res:0, result:1; Push create kafka:0; Push create databus:0; Register comment result:0; Add outbox result:1&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;dynamic_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">588320531406678918</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;create_result&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;dynamic_id_str&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;588320531406678918&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;_gt_&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</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></div></details><details><summary>at 两个人:</summary><p>动态正文</p><div class="language- line-numbers-mode" data-highlighter="shiki" data-ext="" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-"><span class="line"><span>[热词系列_神仙UP]@暮光小猿wzt @社会易姐QwQ</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>at_uids</p><div class="language- line-numbers-mode" data-highlighter="shiki" data-ext="" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-"><span class="line"><span>15858903,293793435</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>ctrl</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:#D4D4D4;">  { </span><span style="color:#9CDCFE;">&quot;location&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">11</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">&quot;type&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">&quot;length&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">9</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">&quot;data&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;15858903&quot;</span><span style="color:#D4D4D4;"> },</span></span>
<span class="line"><span style="color:#D4D4D4;">  { </span><span style="color:#9CDCFE;">&quot;location&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">20</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">&quot;type&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">&quot;length&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">9</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">&quot;data&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;293793435&quot;</span><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></div><p>命令</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-bash"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/create&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;dynamic_id&#39;:</span><span style="color:#CE9178;"> &#39;0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;type&#39;:</span><span style="color:#CE9178;"> &#39;4&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;rid&#39;:</span><span style="color:#CE9178;"> &#39;0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;content&#39;:</span><span style="color:#CE9178;"> &#39;[热词系列_神仙UP]@暮光小猿wzt @社会易姐QwQ &#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;up_choose_comment&#39;:</span><span style="color:#CE9178;"> &#39;0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;up_close_comment&#39;:</span><span style="color:#CE9178;"> &#39;0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;extension&#39;:</span><span style="color:#CE9178;"> &#39;{&quot;emoji_type&quot;:1,&quot;from&quot;:{&quot;emoji_type&quot;:1},&quot;flag_cfg&quot;:{}}&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;at_uids&#39;:</span><span style="color:#CE9178;"> &#39;15858903,293793435&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;ctrl&#39;:</span><span style="color:#CE9178;"> &#39;[{&quot;location&quot;:11,&quot;type&quot;:1,&quot;length&quot;:9,&quot;data&quot;:&quot;15858903&quot;},{&quot;location&quot;:20,&quot;type&quot;:1,&quot;length&quot;:9,&quot;data&quot;:&quot;293793435&quot;}]&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;csrf_token&#39;:</span><span style="color:#CE9178;"> &#39;de2731532b4ab96bc8536da948932668&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    --data-urlencode</span><span style="color:#CE9178;"> &#39;csrf&#39;:</span><span style="color:#CE9178;"> &#39;de2731532b4ab96bc8536da948932668&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">    -b</span><span style="color:#CE9178;"> &#39;SESSDATA=******&#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 class="line-number"></div></div></div></details><h2 id="发表复杂动态" tabindex="-1"><a class="header-anchor" href="#发表复杂动态"><span>发表复杂动态</span></a></h2><blockquote><p>https://api.bilibili.com/x/dynamic/feed/create/dyn</p></blockquote><p><em>请求方法：POST</em></p><p>认证方式：Cookie (SESSDATA)</p><p><strong>URL 参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>csrf</td><td>string</td><td>CSRF Token (即 Cookie 中 bili_jct)</td><td>必要</td><td></td></tr></tbody></table><p><strong>正文参数 (application/json):</strong></p><p>根对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>dyn_req</td><td>object</td><td>请求本体</td><td>必要</td><td></td></tr></tbody></table><p><code>dyn_req</code> 对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>attach_card</td><td>object</td><td>特殊卡片</td><td>非必要</td><td>如直播预约等</td></tr><tr><td>content</td><td>object</td><td>动态内容</td><td>非必要</td><td></td></tr><tr><td>meta</td><td>object</td><td>元信息</td><td>非必要</td><td>大概是来源信息</td></tr><tr><td>scene</td><td>number</td><td>动态类型?</td><td>必要</td><td>纯文本: 1 (实际同 2)<br>带图: 2<br>4: 转发</td></tr><tr><td>pics</td><td>object[]</td><td>携带图片</td><td>非必要</td><td>最多九个</td></tr><tr><td>topic</td><td>object</td><td>话题</td><td>非必要</td><td></td></tr><tr><td>option</td><td>object</td><td>互动设置</td><td>非必要</td><td>没有此项时默认开启评论区</td></tr><tr><td>upload_id</td><td>string</td><td>客户端生成的</td><td>非必要</td><td>内容为<code>发送人mid</code>+<code>当前秒级时间戳</code>+<code>四位随机整数</code>,中间用<code>_</code>隔开</td></tr></tbody></table><p><code>dyn_req.meta</code> 对象:</p><p>大概是来源信息, 示例见下</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;app_meta&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;from&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;create.dynamic.web&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;mobi_app&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;web&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></div><p><code>dyn_req.content</code> 对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>contents</td><td>object[]</td><td>动态组件对象有序数组</td><td>必要</td><td></td></tr></tbody></table><p><code>dyn_req.content.contents[]</code> 对象:</p>`,68)),t("table",null,[s[13]||(s[13]=t("thead",null,[t("tr",null,[t("th",null,"参数名"),t("th",null,"类型"),t("th",null,"内容"),t("th",null,"必要性"),t("th",null,"备注")])],-1)),t("tbody",null,[s[12]||(s[12]=t("tr",null,[t("td",null,"raw_text"),t("td",null,"string"),t("td",null,"文本"),t("td",null,"必要"),t("td")],-1)),t("tr",null,[s[2]||(s[2]=t("td",null,"type",-1)),s[3]||(s[3]=t("td",null,"number",-1)),s[4]||(s[4]=t("td",null,"组件类型 id",-1)),s[5]||(s[5]=t("td",null,"不必要",-1)),t("td",null,[s[1]||(s[1]=n("参见 ")),e(a,{to:"/docs/opus/rich_text_nodes.html"},{default:d(()=>s[0]||(s[0]=[n("富文本节点类型")])),_:1,__:[0]})])]),t("tr",null,[s[8]||(s[8]=t("td",null,"biz_id",-1)),s[9]||(s[9]=t("td",null,"string",-1)),s[10]||(s[10]=t("td",null,"动态组件的内容id转字符串",-1)),s[11]||(s[11]=t("td",null,"不必要",-1)),t("td",null,[s[7]||(s[7]=n("参见 ")),e(a,{to:"/docs/opus/rich_text_nodes.html"},{default:d(()=>s[6]||(s[6]=[n("富文本节点类型")])),_:1,__:[6]})])])])]),s[15]||(s[15]=l(`<p><code>dyn_req.topic</code> 对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>from_source</td><td>string</td><td>来源id?</td><td>不必要</td><td>网页版直接选为 <code>dyn.web.list</code></td></tr><tr><td>from_topic_id</td><td>number</td><td>0</td><td>不必要</td><td></td></tr><tr><td>id</td><td>number</td><td>话题id</td><td>必要</td><td></td></tr><tr><td>name</td><td>string</td><td>话题名</td><td>不必要</td><td></td></tr></tbody></table><p><code>dyn_req.pics[]</code> 对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>img_height</td><td>number</td><td>图高</td><td>非必要</td><td>这个东西会直接原封不动传到前端,比如你都写 0 在网页上就看不见了, 但是还会加载</td></tr><tr><td>img_width</td><td>number</td><td>图宽</td><td>非必要</td><td>同上</td></tr><tr><td>img_size</td><td>float</td><td>图片文件大小(KB)</td><td>非必要</td><td></td></tr><tr><td>img_src</td><td>string</td><td>图片 URL</td><td>必要</td><td></td></tr></tbody></table><p><code>dyn_req.option</code> 对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>up_choose_comment</td><td>number</td><td>精选评论flag</td><td>非必要</td><td>1: 开启</td></tr><tr><td>close_comment</td><td>number</td><td>关闭评论flag</td><td>非必要</td><td>同上, 上二选一</td></tr></tbody></table><p><code>dyn_req.topic</code> 对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>from_source</td><td>string</td><td><code>dyn.web.list</code></td><td>非必要</td><td>作用不明</td></tr><tr><td>from_topic_id</td><td>number</td><td>0</td><td>非必要</td><td>作用不明</td></tr><tr><td>id</td><td>number</td><td>话题id</td><td>必要</td><td></td></tr><tr><td>name</td><td>string</td><td>话题名</td><td>非必要</td><td></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>number</td><td>返回值</td><td>0: 成功<br>-101: 账号未登录<br>4126021: 你没有绑定手机，无法发布动态</td></tr><tr><td>message</td><td>string</td><td>错误信息</td><td>成功为空</td></tr><tr><td>data</td><td>object</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>result</td><td>number</td><td>0</td><td></td></tr><tr><td>message</td><td>string</td><td>错误信息</td><td></td></tr><tr><td>dyn_id</td><td>number</td><td>动态 id</td><td></td></tr><tr><td>dyn_id_str</td><td>string</td><td>动态 id</td><td>字符串格式</td></tr><tr><td>dyn_type</td><td>number</td><td>动态类型</td><td>1: 转发<br>2: 图文</td></tr><tr><td>share_window</td><td>object</td><td>分享提示</td><td>当 Cookie 不存在 <code>buvid3</code> 时存在</td></tr></tbody></table><p><code>data.share_window</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>main_title</td><td>string</td><td><code>分享后会获得更多曝光，快去分享吧</code></td><td></td></tr></tbody></table><p><strong>示例:</strong></p><details><summary>Cookie 带 \`buvid3\`:</summary><p>动态正文</p><div class="language- line-numbers-mode" data-highlighter="shiki" data-ext="" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-"><span class="line"><span>Test礼堂丁真,鉴定为一眼丁真</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>带两张一样的图:</p><p>http://i0.hdslb.com/bfs/new_dyn/322acd0fa92cfa59c0ad70e95ab95476470310172.png</p><p>然后关闭评论区</p><p>命令</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-bash"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> POST</span><span style="color:#CE9178;"> &#39;https://api.bilibili.com/x/dynamic/feed/create/dyn?csrf=xxxxx&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&#39;buvid3=114514;SESSDATA=xxxxx;&#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/json&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-raw </span><span style="color:#CE9178;">&#39;{</span></span>
<span class="line"><span style="color:#CE9178;">    &quot;dyn_req&quot;: {</span></span>
<span class="line"><span style="color:#CE9178;">        &quot;content&quot;: {</span></span>
<span class="line"><span style="color:#CE9178;">            &quot;contents&quot;: [</span></span>
<span class="line"><span style="color:#CE9178;">                {</span></span>
<span class="line"><span style="color:#CE9178;">                    &quot;raw_text&quot;: &quot;Test&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">                    &quot;type&quot;: 1,</span></span>
<span class="line"><span style="color:#CE9178;">                    &quot;biz_id&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#CE9178;">                },</span></span>
<span class="line"><span style="color:#CE9178;">                {</span></span>
<span class="line"><span style="color:#CE9178;">                    &quot;raw_text&quot;: &quot;礼堂丁真,鉴定为一眼丁真&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">                    &quot;type&quot;: 2,</span></span>
<span class="line"><span style="color:#CE9178;">                    &quot;biz_id&quot;: &quot;1463028352&quot;</span></span>
<span class="line"><span style="color:#CE9178;">                }</span></span>
<span class="line"><span style="color:#CE9178;">            ]</span></span>
<span class="line"><span style="color:#CE9178;">        },</span></span>
<span class="line"><span style="color:#CE9178;">        &quot;pics&quot;: [</span></span>
<span class="line"><span style="color:#CE9178;">            {</span></span>
<span class="line"><span style="color:#CE9178;">                &quot;img_src&quot;: &quot;http://i0.hdslb.com/bfs/new_dyn/322acd0fa92cfa59c0ad70e95ab95476470310172.png&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">                &quot;img_width&quot;: 1368,</span></span>
<span class="line"><span style="color:#CE9178;">                &quot;img_height&quot;: 1500,</span></span>
<span class="line"><span style="color:#CE9178;">                &quot;img_size&quot;: 662.6005859375</span></span>
<span class="line"><span style="color:#CE9178;">            },</span></span>
<span class="line"><span style="color:#CE9178;">            {</span></span>
<span class="line"><span style="color:#CE9178;">                &quot;img_src&quot;: &quot;http://i0.hdslb.com/bfs/new_dyn/322acd0fa92cfa59c0ad70e95ab95476470310172.png&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">                &quot;img_width&quot;: 1368,</span></span>
<span class="line"><span style="color:#CE9178;">                &quot;img_height&quot;: 1500,</span></span>
<span class="line"><span style="color:#CE9178;">                &quot;img_size&quot;: 662.6005859375</span></span>
<span class="line"><span style="color:#CE9178;">            }</span></span>
<span class="line"><span style="color:#CE9178;">        ],</span></span>
<span class="line"><span style="color:#CE9178;">        &quot;option&quot;: {</span></span>
<span class="line"><span style="color:#CE9178;">            &quot;close_comment&quot;: 1</span></span>
<span class="line"><span style="color:#CE9178;">        },</span></span>
<span class="line"><span style="color:#CE9178;">        &quot;scene&quot;: 2</span></span>
<span class="line"><span style="color:#CE9178;">    }</span></span>
<span class="line"><span style="color:#CE9178;">}&#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 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><p>响应:</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;">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;dyn_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">755402172521250838</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;dyn_id_str&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;755402172521250838&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;dyn_type&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">2</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;dyn_rid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">221621773</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></div></details><h2 id="立即发布定时动态" tabindex="-1"><a class="header-anchor" href="#立即发布定时动态"><span>立即发布定时动态</span></a></h2><blockquote><p>https://api.vc.bilibili.com/dynamic_draft/v1/dynamic_draft/publish_now</p></blockquote><p><em>请求方法: POST</em></p><p>认证方式: Cookie (SESSDATA)</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>draft_id</td><td>file</td><td>定时动态(草稿)id</td><td>必要</td><td></td></tr><tr><td>csrf</td><td>string</td><td>CSRF Token（即 Cookie 中 bili_jct)</td><td>必要</td><td></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>number</td><td>返回值</td><td>0: 成功</td></tr><tr><td>data</td><td>object</td><td>信息本体</td><td>正常为空对象</td></tr><tr><td>message</td><td>string</td><td>错误消息</td><td>正常为 <code>0</code></td></tr><tr><td>ttl</td><td>number</td><td>1</td><td></td></tr></tbody></table><details><summary>查看示例</summary><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-bash"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> POST</span><span style="color:#CE9178;"> &#39;https://api.vc.bilibili.com/dynamic_draft/v1/dynamic_draft/publish_now&#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&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;draft_id=755409289278914611&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;csrf=xxx&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">-b</span><span style="color:#CE9178;"> &#39;SESSDATA=xxxx;&#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></div><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 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:#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></div></details>`,27))])}const b=o(c,[["render",u]]),m=JSON.parse('{"path":"/docs/dynamic/publish.html","title":"发布动态","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1753073642000,"contributors":[{"name":"SocialSisterYi","username":"SocialSisterYi","email":"1440239038@qq.com","commits":2,"url":"https://github.com/SocialSisterYi"},{"name":"wuziqian211","username":"wuziqian211","email":"65224318+wuziqian211@users.noreply.github.com","commits":1,"url":"https://github.com/wuziqian211"},{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":3,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"ad82eb03854553e230d449e4546cfdc97be17892","time":1753073642000,"email":"102411014+SessionHu@users.noreply.github.com","author":"SessionHu","message":"feat(dynamic/publish.md): update create dyn"},{"hash":"2397caa7f95beaac6981badea83daf20146474f7","time":1753001475000,"email":"102411014+SessionHu@users.noreply.github.com","author":"SessionHu","message":"feat(dynamic/publish.md): update upload_bfs"},{"hash":"867395b6d7731e2cb31f96dd3a0b0e19b9017efb","time":1748661265000,"email":"102411014+SessionHu@users.noreply.github.com","author":"SessionHu","message":"style(dynamic/publish.md): 初步规范化"},{"hash":"93b4a09aa0cb45e1d856198d10f660365ea684be","time":1744726185000,"email":"65224318+wuziqian211@users.noreply.github.com","author":"晨叶梦春","message":"update"},{"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/dynamic/publish.md"}');export{b as comp,m as data};
