- 开发指南
- 基础API
- 登录模块
- 联系人模块
- 群模块
- 消息模块
- 朋友圈模块
- 标签模块
- 个人模块
- 收藏夹模块
- 视频号模块
- 账号管理
- 更多信息
下载语音
POST
/gewe/v2/api/message/downloadVoice
请求参数
Header 参数
X-GEWE-TOKEN
string
必需
示例值:
{{gewe-token}}
Body 参数application/json
appId
string
设备ID
xml
string
回调消息中的XML
msgId
number
必需
示例
{
"appId": "{{appid}}",
"msgId": 1169533812,
"xml": "<msg><voicemsg endflag=\"1\" cancelflag=\"0\" forwardflag=\"0\" voiceformat=\"4\" voicelength=\"2240\" length=\"3628\" bufid=\"0\" aeskey=\"62013d1f79bce5563cc0c9275a64f2ee\" voiceurl=\"3052020100044b304902010002048399cc8402032f7d6d0204dbb5bade02046593782f042439386135326438322d393930642d346436632d616330342d61363831343465353831386202040124000f0201000400\" voicemd5=\"\" clientmsgid=\"490e77adc00658795ba14f7368fe367934757816141@chatroom_40_1704163373\" fromusername=\"zhangchuan2288\" /></msg>"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://api.geweapi.com/gewe/v2/api/message/downloadVoice' \
--header 'X-GEWE-TOKEN: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"appId": "",
"msgId": 1169533812,
"xml": "<msg><voicemsg endflag=\"1\" cancelflag=\"0\" forwardflag=\"0\" voiceformat=\"4\" voicelength=\"2240\" length=\"3628\" bufid=\"0\" aeskey=\"62013d1f79bce5563cc0c9275a64f2ee\" voiceurl=\"3052020100044b304902010002048399cc8402032f7d6d0204dbb5bade02046593782f042439386135326438322d393930642d346436632d616330342d61363831343465353831386202040124000f0201000400\" voicemd5=\"\" clientmsgid=\"490e77adc00658795ba14f7368fe367934757816141@chatroom_40_1704163373\" fromusername=\"zhangchuan2288\" /></msg>"
}'
返回响应
🟢200成功
application/json
Body
ret
integer
必需
msg
string
必需
data
object
必需
fileUrl
string
必需
示例
{
"ret": 200,
"msg": "操作成功",
"data": {
"fileUrl": "http://wxapii.oos-sccd.ctyunapi.cn/20240102/wx_HJDZOY09-ucKMhzu8jQ2Z/64783c88-7771-4fb7-b42b-7330f7fd1869.silk?AWSAccessKeyId=9e882e7187c38b431303&Expires=1704768214&Signature=tiMK%2Fb5CYqximr9XTdggz442z6o%3D"
}
}
修改于 2025-01-17 06:57:12