Python 如何在Twilio中获得最新录音?

Python 如何在Twilio中获得最新录音?,python,twilio-twiml,Python,Twilio Twiml,我正在用python在Twilio中录音。只是想知道如何访问我制作的最新/最新录音?干杯 录制: resp = twilio.twiml.Response() resp.say("Please record your message after the beep") resp.record(maxLength="10", action="/handle-recording") 访问录音的示例代码,如何为最新版本编写代码?谢谢 # Download the Python helper libra

我正在用python在Twilio中录音。只是想知道如何访问我制作的最新/最新录音?干杯

录制:

resp = twilio.twiml.Response()
resp.say("Please record your message after the beep")
resp.record(maxLength="10", action="/handle-recording")
访问录音的示例代码,如何为最新版本编写代码?谢谢

# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "AC30bd8bdca7572344721eb96c15a5c0c7"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of recording objects with the properties described above
recordings = client.recordings.list()

recordings[-1]
应该为您获取录制中的最后一项,它应该是最新的录制,因为录制将附加到列表中。确保
录制
不为空,否则您将获得一个
索引器

,在有人发表评论之前,不,这不是我的API密钥。我如何获取该文件的url?重新编码实例资源具有您可以访问的URI。请参阅Twilio的以下文档: