import{_ as n,c as t,a,o as l}from"./app-Dgsdh8A6.js";const o={};function e(p,s){return l(),t("div",null,s[0]||(s[0]=[a(`<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.live.bilibili.com/xlive/app-room/v1/dm/interaction/votePanel</p></blockquote><p><em>请求方法: GET</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>room_id</td><td>num</td><td>直播间id</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>num</td><td>返回值</td><td>-400：请求错误<br>-101：未登录<br>0：成功</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>成功时为<code>&quot;0&quot;</code></td></tr><tr><td>ttl</td><td>num</td><td><code>1</code></td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td>不是登录信息对应的直播间时将为 <code>null</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_info</td><td>obj</td><td>当前活动的投票信息</td><td>若当前没有活动的投票将为空对象</td></tr><tr><td>templates</td><td>arr</td><td>投票模板</td><td></td></tr></tbody></table><p><code>data.vote_info</code> 对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>status</td><td>num</td><td>投票状态</td><td>见<a href="#%E6%8A%95%E7%A5%A8%E7%8A%B6%E6%80%81">投票状态</a>枚举</td></tr><tr><td>question</td><td>str</td><td>投票问题</td><td></td></tr><tr><td>options</td><td>arr</td><td>投票选项</td><td></td></tr><tr><td>duration</td><td>num</td><td>投票持续时间</td><td>单位:毫秒</td></tr><tr><td>result</td><td>num</td><td>投票结果偏向哪一方状态</td><td></td></tr><tr><td>result_text</td><td>str</td><td>投票结果偏向哪一方</td><td></td></tr><tr><td>etime_str</td><td>str</td><td>投票结束时间</td><td></td></tr><tr><td>left_duration</td><td>num</td><td>投票剩余时间</td><td>单位:毫秒，投票结束后不存在</td></tr><tr><td>interaction_id</td><td>num</td><td>投票互动id</td><td></td></tr><tr><td>template_id</td><td>num</td><td>投票模板id</td><td>使用模板时存在</td></tr></tbody></table><p><code>data.vote_info.options</code> 数组：</p><table><thead><tr><th>索引</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>obj</td><td>投票选项1</td><td></td></tr><tr><td>1</td><td>obj</td><td>投票选项2</td><td></td></tr></tbody></table><p><code>data.vote_info.options</code> 数组中对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>idx</td><td>num</td><td>选项id</td><td></td></tr><tr><td>desc</td><td>str</td><td>投票选项描述</td><td></td></tr><tr><td>percent</td><td>num</td><td>投票选项占比显示</td><td></td></tr></tbody></table><p><code>data.templates</code> 数组：</p><table><thead><tr><th>索引</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>obj</td><td>投票模板信息</td><td></td></tr><tr><td>…</td><td>obj</td><td>投票模板信息</td><td></td></tr></tbody></table><p><code>data.templates</code> 数组中对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>template_id</td><td>num</td><td>模板id</td><td></td></tr><tr><td>question</td><td>str</td><td>投票问题</td><td></td></tr><tr><td>option_a</td><td>str</td><td>投票选项A</td><td></td></tr><tr><td>option_b</td><td>str</td><td>投票选项B</td><td></td></tr></tbody></table><p><strong>示例：</strong></p><p>查询投票信息</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.live.bilibili.com/xlive/app-room/v1/dm/interaction/votePanel?room_id=1&#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-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;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;vote_info&quot;</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;">4</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;question&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;options&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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;duration&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">600000</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;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;result_text&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;etime_str&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;08-31 15:44&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;left_duration&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">549660</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;interaction_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">120122595433984</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;templates&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;template_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">54339003518976</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;question&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;option_a&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;option_b&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>
<span class="line"><span style="color:#9CDCFE;">        &quot;template_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">48570973661696</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;question&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;option_a&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;option_b&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:#6A9955;">      // 省略了大部分内容</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;template_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">46203444257280</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;question&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;option_a&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;option_b&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>
<span class="line"><span style="color:#9CDCFE;">        &quot;template_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">96177095781888</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;question&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;option_a&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;option_b&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>
<span class="line"><span style="color:#9CDCFE;">        &quot;template_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">103827382481920</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;question&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;1&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;option_a&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;1&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;option_b&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;1&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:#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 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="查询投票历史" tabindex="-1"><a class="header-anchor" href="#查询投票历史"><span>查询投票历史</span></a></h2><blockquote><p>https://api.live.bilibili.com/xlive/app-room/v1/dm/interaction/voteHistory</p></blockquote><p><em>请求方法: GET</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>room_id</td><td>num</td><td>直播间id</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>num</td><td>返回值</td><td>-400：请求错误<br>-101：未登录<br>0：成功</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>成功时为<code>&quot;0&quot;</code></td></tr><tr><td>ttl</td><td>num</td><td><code>1</code></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>history</td><td>arr</td><td>投票历史列表</td><td></td></tr></tbody></table><p><code>data.history</code> 数组：</p><table><thead><tr><th>索引</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>obj</td><td>投票历史</td><td>与<a href="#%E6%9F%A5%E8%AF%A2%E6%8A%95%E7%A5%A8%E4%BF%A1%E6%81%AF">查询投票信息</a><code>data.vote_info</code>相同</td></tr><tr><td>…</td><td>obj</td><td>投票历史</td><td>与<a href="#%E6%9F%A5%E8%AF%A2%E6%8A%95%E7%A5%A8%E4%BF%A1%E6%81%AF">查询投票信息</a><code>data.vote_info</code>相同</td></tr><tr><td>9</td><td>obj</td><td>投票历史</td><td>与<a href="#%E6%9F%A5%E8%AF%A2%E6%8A%95%E7%A5%A8%E4%BF%A1%E6%81%AF">查询投票信息</a><code>data.vote_info</code>相同</td></tr></tbody></table><p><code>data.history</code> 数组中对象：</p><p>与 <a href="#%E6%9F%A5%E8%AF%A2%E6%8A%95%E7%A5%A8%E4%BF%A1%E6%81%AF">查询投票信息</a> json回复的 <code>data.vote_info</code> 相同。</p><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://api.live.bilibili.com/xlive/app-room/v1/dm/interaction/voteHistory?room_id=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  -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></div><details><summary>查看响应示例：</summary><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;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;history&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;status&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;question&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;options&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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;duration&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">600000</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;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;result_text&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;etime_str&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;08-31 15:44&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;interaction_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">120122595433984</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;status&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;question&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;options&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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;duration&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">60000</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;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;result_text&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;etime_str&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;08-31 14:57&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;interaction_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">120117830648832</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;status&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;question&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;options&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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;duration&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">180000</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;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;result_text&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;etime_str&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;08-31 14:53&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;interaction_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">120117121798656</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;status&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;question&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;options&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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;idx&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;desc&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;percent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.5</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;duration&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">60000</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;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;result_text&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;etime_str&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;08-31 14:41&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;interaction_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">120115796409344</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;template_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">3109187328000</span></span>
<span class="line"><span style="color:#D4D4D4;">      }</span></span>
<span class="line"><span style="color:#6A9955;">      // 省略其余6项</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 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 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="投票状态" tabindex="-1"><a class="header-anchor" href="#投票状态"><span>投票状态</span></a></h2><p>此处列出已发现的投票状态，在投票信息和直播信息流 <code>DM_INTERACTION</code> 的类型 <code>101</code> 等地方使用。</p><p>当前状态信息来自混淆代码寻找而来。</p><table><thead><tr><th>值</th><th>含义</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td></td><td>键名 <code>NONE</code></td></tr><tr><td>1</td><td>等待审核</td><td>键名 <code>WAITING_AUDIT</code></td></tr><tr><td>2</td><td>审核失败</td><td>键名 <code>AUDIT_FAILED</code></td></tr><tr><td>4</td><td>投票进行中</td><td>键名 <code>DURING</code></td></tr><tr><td>5</td><td>投票结束</td><td>键名 <code>END</code></td></tr><tr><td>6</td><td></td><td>键名 <code>STOP</code></td></tr></tbody></table><h2 id="创建直播投票" tabindex="-1"><a class="header-anchor" href="#创建直播投票"><span>创建直播投票</span></a></h2><blockquote><p>https://api.live.bilibili.com/xlive/app-room/v1/dm/interaction/createVote</p></blockquote><p><em>请求方法: POST</em></p><p>认证方式: Cookie (SESSDATA)</p><p>鉴权方式: Cookie中<code>bili_jct</code>的值正确并与<code>csrf</code>相同</p><p>投票创建完成后，投票信息和审核结果将以直播信息流 <code>DM_INTERACTION</code> 的类型 <code>101</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>room_id</td><td>num</td><td>直播间id</td><td>必要</td><td>必须为登录信息对应的直播间</td></tr><tr><td>duration</td><td>num</td><td>持续时间</td><td>必要</td><td>必须为整数，目前范围<code>0&lt;d&lt;10</code></td></tr><tr><td>question</td><td>str</td><td>投票问题</td><td>必要</td><td></td></tr><tr><td>option_a</td><td>str</td><td>选项A</td><td>必要</td><td></td></tr><tr><td>option_b</td><td>str</td><td>选项B</td><td>必要</td><td></td></tr><tr><td>template_id</td><td>num</td><td>投票模板id</td><td>非必要</td><td></td></tr><tr><td>live_key</td><td>str</td><td>直播场次key</td><td>非必要</td><td>需要更多信息</td></tr><tr><td>sub_session_key</td><td>str</td><td>(?)</td><td>非必要</td><td>需要更多信息</td></tr><tr><td>csrf_token</td><td>str</td><td>CSRF Token（位于cookie）</td><td>非必要</td><td></td></tr><tr><td>csrf</td><td>str</td><td>CSRF Token（位于cookie）</td><td>必要</td><td></td></tr><tr><td>visit_id</td><td>str</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>num</td><td>返回值</td><td>-404：不是自己的直播间<br>-400：参数错误<br>-101：未登录<br>-111：csrf校验失败<br>0：成功</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>成功时为<code>&quot;0&quot;</code></td></tr><tr><td>ttl</td><td>num</td><td><code>1</code></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>interaction_id</td><td>num</td><td>投票互动id</td><td></td></tr></tbody></table><p><strong>示例：</strong></p><p>创建一个投票</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.live.bilibili.com/xlive/app-room/v1/dm/interaction/createVote&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;room_id=3&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;duration=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;question=abcdef&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;option_a=A&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;option_b=B&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;csrf=xxx&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  -b</span><span style="color:#CE9178;"> &#39;SESSDATA=xxx;bili_jct=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></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;interaction_id&quot;</span><span style="color:#D4D4D4;">:</span><span style="color:#B5CEA8;">120008099262976</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="中断直播投票" tabindex="-1"><a class="header-anchor" href="#中断直播投票"><span>中断直播投票</span></a></h2><blockquote><p>https://api.live.bilibili.com/xlive/app-room/v1/dm/interaction/terminateVote</p></blockquote><p><em>请求方法: POST</em></p><p>认证方式: Cookie (SESSDATA)</p><p>鉴权方式: Cookie中<code>bili_jct</code>的值正确并与<code>csrf</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>interaction_id</td><td>num</td><td>投票互动id</td><td>必要</td><td>必须为该登录信息创建的投票</td></tr><tr><td>room_id</td><td>num</td><td>直播间id</td><td>必要</td><td>必须为登录信息对应的直播间</td></tr><tr><td>csrf_token</td><td>str</td><td>CSRF Token（位于cookie）</td><td>非必要</td><td></td></tr><tr><td>csrf</td><td>str</td><td>CSRF Token（位于cookie）</td><td>必要</td><td></td></tr><tr><td>visit_id</td><td>str</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>num</td><td>返回值</td><td>-400：参数错误<br>-101：未登录<br>-111：csrf校验失败<br>0：成功<br>1003402：修改投票状态失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>成功时为<code>&quot;0&quot;</code></td></tr><tr><td>ttl</td><td>num</td><td><code>1</code></td><td></td></tr><tr><td>data</td><td>null</td><td>无</td><td></td></tr></tbody></table><p><strong>示例：</strong></p><p>中断某个投票</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.live.bilibili.com/xlive/app-room/v1/dm/interaction/terminateVote&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;interaction_id=120122595433984&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;room_id=1&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  --data-urlencode</span><span style="color:#CE9178;"> &#39;csrf=xxx&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#569CD6;">  -b</span><span style="color:#CE9178;"> &#39;SESSDATA=xxx;bili_jct=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 style="color:#569CD6;">null</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><h2 id="弹幕投票主播侧界面" tabindex="-1"><a class="header-anchor" href="#弹幕投票主播侧界面"><span>弹幕投票主播侧界面</span></a></h2><blockquote><p>https://live.bilibili.com/p/html/live-app-guessing-game/anchor_vote.html</p></blockquote><p>直接访问此页面存在部分功能不可用的情况。</p><p><strong>URL查询参数：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>room_id</td><td>num</td><td>直播间id</td><td>必要</td><td>必须为自己的直播间</td></tr></tbody></table>`,84)]))}const r=n(o,[["render",e]]),c=JSON.parse('{"path":"/docs/live/live_vote.html","title":"直播投票","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1756671893000,"contributors":[{"name":"pskdje","username":"pskdje","email":"77605497+pskdje@users.noreply.github.com","commits":1,"url":"https://github.com/pskdje"}],"changelog":[{"hash":"db6215218b73678e0b72dc1c2235dbe9eaf056e3","time":1756671893000,"email":"77605497+pskdje@users.noreply.github.com","author":"pskdje","message":"添加 直播投票 文档"}]},"filePathRelative":"docs/live/live_vote.md"}');export{r as comp,c as data};
