调用 RingCentral Create Custom Greeting 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)
更多内容在这篇博客文章中: