.. module:: twilio.rest.resources
For more information, see the Notifications REST Resource documentation.
The following code will print out additional information about each of your current :class:`Notification` resources.
from twilio.rest import TwilioRestClient
# To find these visit https://www.twilio.com/user/account
ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXX"
AUTH_TOKEN = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
for notification in client.notifications.list():
print notification.more_infoYou can filter transcriptions by :attr:`log` and :attr:`message_date`. The :attr:`log` value is 0 for ERROR and 1 for WARNING.
from twilio.rest import TwilioRestClient
# To find these visit https://www.twilio.com/user/account
ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXX"
AUTH_TOKEN = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
ERROR = 0
for notification in client.notifications.list(log=ERROR):
print notification.error_codeNote
Due to the potentially voluminous amount of data in a notification, the full HTTP request and response data is only returned in the :class:`Notification` instance resource representation.
Your account can sometimes generate an inordinate amount of :class:`Notification` resources. The :class:`Notifications` resource allows you to delete unnecessary notifications.
from twilio.rest import TwilioRestClient
# To find these visit https://www.twilio.com/user/account
ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXX"
AUTH_TOKEN = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
client.notifications.delete("NO123")