简要描述:
- 下载消息中的语音
请求URL:
http://域名地址/getMsgVoice
请求方式:
- POST
请求头Headers:
- Content-Type:application/json
- Authorization:login接口返回
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
wId | 是 | string | 登录实例标识 包含此参数 所有参数都是从消息回调中取) |
msgId | 是 | long | 消息id |
length | 是 | int | 语音长度(xml数据中的length字段) |
bufId | 是 | string | xml中返回的bufId字段值 |
fromUser | 是 | string | 发送者 |
返回数据:
参数名 | 类型 | 说明 |
---|---|---|
code | string | 1000成功,1001失败 |
msg | string | 反馈信息 |
请求参数示例
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
<span style="color:#990055">"wId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"24a929b2-016d-4932-b93f-ff1b0a800305"</span><span style="color:#999999">,</span>
<span style="color:#990055">"msgId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#990055">1114311129</span><span style="color:#999999">,</span>
<span style="color:#990055">"fromUser"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"zhongweiyu789"</span><span style="color:#999999">,</span>
<span style="color:#990055">"bufId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"289139440622895483"</span><span style="color:#999999">,</span>
<span style="color:#990055">"length"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span><span style="color:#990055">3227</span>
<span style="color:#999999">}</span></code></span></span></span></span>
成功返回示例
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
<span style="color:#990055">"message"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"成功"</span><span style="color:#999999">,</span>
<span style="color:#990055">"code"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"1000"</span><span style="color:#999999">,</span>
<span style="color:#990055">"data"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#999999">{</span>
<span style="color:#990055">"url"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"https://weikong-1301028514.cos.ap-shanghai.myqcloud.com//msgImg/e2045467-b1ac-4b3c-89f8-62ab2b3a2284-1591351192235-300000.silk"</span>
<span style="color:#999999">}</span>
<span style="color:#999999">}</span></code></span></span></span></span>
错误返回示例
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
<span style="color:#990055">"message"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"失败"</span><span style="color:#999999">,</span>
<span style="color:#990055">"code"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"1001"</span><span style="color:#999999">,</span>
<span style="color:#990055">"data"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#0077aa">null</span>
<span style="color:#999999">}</span></code></span></span></span></span>
测试地址:https://wkteam.cn/