我正在将Twilio沙箱用于WhatsApp,当我发送图像时,在Webhook中收到的有效负载可以正常工作,我可以获取图像的url,但不适用于音频文件(语音消息)。
我遇到了音频问题,如果我从WhatsApp发送语音消息,则Webhook中的有效负载不包含音频URL。
这里的有效载荷:
{
"SmsMessageSid": "SMf79a4b49251969d1c0cf25d7dXXXXXXX",
"NumMedia": "0",
"SmsSid": "SMf79a4b49251969d1c0cf25d7dXXXXXXX3",
"SmsStatus": "received",
"Body": "",
"To": "whatsapp:+1415XXXXXXX",
"NumSegments": "1",
"MessageSid": "SMf79a4b49251969d1c0cf25d7dab11313",
"AccountSid": "AC33e5010eecfa033d3c03aaa4faef5561",
"From": "whatsapp:+52155XXXXXXXX",
"ApiVersion": "2010-04-01"
}
我希望这样的url媒体:
"MediaUrl0": "https://api.twilio.com/2010-04-01/Accounts/AC33e5010eecfa033d3c03aaa4faef5561/Messages/MM637c2240c42ae13b481451cdbde7072e/Media/ME2789cc6ce84b1d73d66eb9135bd3253a"