Twilio Programmable Fax is set to sunset in December 2021. We will show you how to get your fax api converted from twilio to Westfax. In this how-to we will show you how to send a fax via the WestFax HIPAA Compliant fax api in 15 minutes or less.
If you are a Twilio customer and utilized their fax API you have surely been notified that as of December 2021, they are sunsetting their Programmable Fax API service.
We want to make transitioning as painless as possible so we created this simple guide to get you up and running immediately.
This article makes certain assumptions. We assume you are a developer or engineer that has a basic understanding of RESTFul APIs and integrations.
First, get a WestFax Account. We have a Free 10-day trial you use to get started. Once you get your account you will have your username and password. We’ll use this to get your API key (ProductId).
Next, Load up the documentation in Postman (It’s free and a great development tool). Here is alink to our documentation. Just click “Run in Postman” in the top right corner.
The WestFax Collection will be displayed on the left-hand side:
Make sure the environment variables are set. In the top right corner.
Click on the Eyeball and you should see some default settings.
Click “Edit” in the top right corner. You can now add some settings here.
Set the User and Pass to the login and password you set when you created an account.
We’ll set the ProductId after we retrieve it from the API. Ok, The settings panel should look like this. Hit save in the top right corner.
Ok, Now let’s go explore the API calls. Break down the list on the left under WestFax.API. It should look like this:
You want to doubleclick Profile_GetF2EProductList - Fax to Email only.
You should see the call open up in the main editor and it will look like this:
Click the Body text with the green dot next to it.
You will see the template strings {{User}} and {{Pass}}. These are just placeholders for the credentials you entered earlier into the environment variables.
Now assuming you set your username and password correctly. You should now hit SEND on the top right. The output should look something like this:
{
"Success": true,
"Result": [
{
"Id": "111111-1111-1111-1111-1111111111",
"Name": "YourAccountName",
"PlanId": "111111-1111-1111-1111-1111111111",
"ProductType": "FaxForward",
"InboundNumber": "88885551212",
"TimeZone": "Pacific",
"ProductState": "OK",
"CurrentBillingPeriodStart": "2021-03-01T00:00:00Z",
"CurrentBillingPeriodEnd": "2021-04-01T00:00:00Z",
"FreeTrialEnd": "2020-10-08T23:59:59Z",
"PeriodicQuantity": 0,
"QuantityInbound": 0,
"QuantityOutbound": 0
}
]
}
You need to copy and paste the Id value into your ProductId Environment variables as we did above. You should also make a note of your fax number because you’ll need it later.
After you do that it should look like this:
Now we can start sending a fax. For this, you will need a test document. We have one here you can use.
Let’s go open the API called named: Fax_SendFax.
When you click on BODY it will look similar to this:
You can see here that there are three fields that are already set: User, Pass, and ProductId. Other fields you can put into a template could be CSID and ANI which should be set to your fax number. You can also set the FeedbackEmail to your email address so you get a notification when the fax is sent. The CallBackUrl is a special formatted field that we discuss in this article. For now, you should Uncheck CallBackUrl.
We’ll discuss each Parameter here. Red fields are required
Ok, so we are going to send a test fax to ourselves. You should replace the Numbers0 with your fax number and the CSID and ANI. Also, be sure to upload a file in the Files0 field. We support most file formats. Doc(x), PDF, TIF, JPG, PNG, GIF, etc...
Here is what your Postman should look like:
If everything is set correctly you can hit SEND in the top right.
You will see a result code in JSON like this:
{
"Success": true,
"Result": "54686546-a8fe-4b09-9d3b-96cc746fb6c6"
}
If you messed up your password or username you will get this.
{
"Success": false,
"ErrorString": "Handler_Failed_",
"InfoString": "Authorization_Failed_BadUsernamePassword"
}
You can verify your user/pass by logging into the WestFax Home Portal which is your inbox/outbox view on the web.
If you get a different error please reach out to us at develop@westfax.com and we’ll give you a hand.
Ok, you sent a fax! That was easy. Now if you want to generate the code you can use Postman's code feature that will generally give you good clean code. In some cases, you may need to tweak it a bit but it’ll get you 90% of the way there. You can generate code by clicking the </> button on the right side of the postman interface:
You will see this dialog pop up. You can toggle between different languages and frameworks: Language chooser
That's it! Should you need any assistance just email us at develop@westfax.com or give us a call at 303-299-9329. Happy Faxing!