Scripting

Python Script (Fax programmable api update)

API for sending and receiving faxes between your application and a fax machine.

Turn faxing documents into a software experience using a simple and reliable API that’s easy to integrate into web and mobile applications.

 

from twilio.rest import Client
import datetime

# Your Account Sid and Auth Token from twilio.com/console
account_sid = ‘youraccountSID’
auth_token = ‘YourToken’
client = Client(account_sid, auth_token)
now = datetime.datetime.now()
faxes = client.fax.faxes.list()
for record in faxes:
if (record.date_created.day == now.day – 1) and (record.status != “delivered”) and (record.status != “failed”):
print(record.sid + ‘,’ + str(record.date_created) + ‘,’ + record.status + ‘,’ + record.from_ + ‘,’ + str(record.to) + ‘,’ + str(record.media_url))
print(record.date_created.day)