如何确定我消耗的Twilio存储量?

时间:2016-04-29 17:35:20

标签: twilio

我使用的是Twilio SMS Msg Rest API。

媒体消息(包含照片)存储在twilio存储中。我在哪里可以看到我消耗了多少存储空间(以MB为单位)?

由于

1 个答案:

答案 0 :(得分:0)

虽然它不是media instance resource的属性,但您可以在使用记录中找到此信息。

在此处查看mediastorage参数:

https://www.twilio.com/docs/api/rest/usage-records#usage-sms-mms

这是为帐户存储的媒体使用的存储量。 Count是存储的媒体文件数,Usage是兆字节数,Price是存储媒体的价格。 Python中的示例:

# 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 = "YOUR_ACCOUNT_SID"
auth_token  = "YOUR_AUTH_TOKEN"
client = TwilioRestClient(account_sid, auth_token)

# A list of record objects with the properties described above
records = client.usage.records.today.list(category="mediastorage")