Python Fax – Send a fax and check its status

 Download the Python samples fax API zip file.
 Download the Modified OSA files.

This is a more advanced Python code sample to show how to send a fax and then check the status of a fax that was submitted until the status indicates that the fax has been completed. This code sample is based on the Python library for InterFAX available on Github.

This sample demonstrates how to send a fax with a PDF through InterFAX to a single recipient and then loop through checking the status of that fax until processing of the fax is completed in InterFAX – all you need to do in order to change it is to provide a different fax destination number and a path to a file.
A fax in InterFAX is completed when either the fax was sent successfully to the recipient (in which case, the fax status would be “0”) or all of the call attempts for this fax have been completed and the fax was not sent fully (in which case the fax status would be > 0).

The status of the fax is only one of several parameters that you can retrieve in regards to a fax. For a full list, please review our API documentation.