调用RingCentral创建自定义问候API时:
POST /restapi/v1.0/account/{accountId}/extension/{extensionId}/greeting
我有时会因较大的文件MP3和WAV媒体文件而出现以下错误 . 是否有官方大小限制?
HTTP/1.1 413 Request Entity Too Large
{
"errorCode": "AGW-413",
"message": "Request entity too large",
"errors": [
]
}
API参考或博客文章中没有指定限制:
API参考:
https://developers.ringcentral.com/api-docs/latest/index.html#!#RefCreateUserCustomGreeting
我正在使用带有以下代码的ringcentral_sdk gem:
req = RingCentralSdk::REST::Request::Multipart.new(
method: 'post',
url: 'account/~/extension/~/greeting'
).
add_json({type: 'Voicemail', answeringRule: {id: '11111111'}}).
add_file(file)
res = client.send_request req
puts res.status
puts MultiJson.encode(res.body, pretty: true)
更多内容在这篇博客文章中:
2 回答
我被告知此API目前有1MB的文件大小限制 .
我在这里测试了0.4MB和2.5MB WAV文件并确认较小的文件工作,较大的文件导致此错误 .
其他有用的测试文件似乎在这里可用:
我写了一个Python示例:https://github.com/tylerlong/ringcentral-python/blob/master/test/test_multipart_mixed.py
我还确认如果音频文件太大,操作将失败,您将收到消息
Request entity too large
.