0

Hope you are having a nice day.

I am getting following error on twillion fax api

HTTP Error Your request was:

POST /Faxes

Twilio returned the following information:

Unable to create record: The requested resource /Faxes was not found

Here is the code .

def __init__(self):
        self.client = Client(
            settings.TWILIO_ACCOUNT_SID,
            settings.TWILIO_AUTH_TOKEN,
        )
        self.sender = settings.FAX_SENDER
        self.receiver = settings.FAX_RECEIVER
        self.callback_url = settings.TWILIO_CALLBACK_URL

i am sending a fax in function with this code

fax = self.client.fax.faxes.create(
                from_=self.sender,
                to=self.receiver,
                media_url=pdf_url,
                status_callback=self.callback_url,
            )

Here is the trackback

fax = client.fax.faxes.create(from_= sender,to=receiver,media_url = 'https://mysite.ca/media/7ad4a93f0e7641b58e078da171b3651a.pdf',status_callback = callback_url,)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/var/www/vhosts/site/httpdocs/venv/lib64/python3.6/site-packages/twilio/rest/fax/v1/fax/__init__.py", line 186, in create
    payload = self._version.create(method='POST', uri=self._uri, data=data, )
  File "/var/www/vhosts/site/httpdocs/venv/lib64/python3.6/site-packages/twilio/base/version.py", line 209, in create
    raise self.exception(method, uri, response, 'Unable to create record')

    
twilio.base.exceptions.TwilioRestException: 
HTTP Error Your request was:

POST /Faxes

Twilio returned the following information:

Unable to create record: The requested resource /Faxes was not found

More information may be available here:

https://www.twilio.com/docs/errors/20404

also, I confirmed that my Twilio account is working and active.

2 Answers2

1

It seems like the Faxes API has been deprecated. If you go to https://www.twilio.com/fax you'll see a message.

We are no longer supporting Programmable Fax as of December 17, 2021.

For new and inactive accounts, access to Programmable Fax is disabled effective immediately. So if your account are new, you basically have no options except switching the provider.

Alexandr Tatarinov
  • 3,946
  • 1
  • 15
  • 30
  • Twilio developer evangelist here. This is correct, there are a few services we recommend and set up migration guides with, you can [find them on this page](https://support.twilio.com/hc/en-us/articles/223136667-Fax-Support-on-Twilio#:~:text=Twilio%20launched%20Programmable%20Fax%20to,accounts%20on%20December%2017%2C%202021.). – philnash Jul 05 '21 at 13:41
  • @philnash Please see the updated question with traceback. I confirmed that my account is working. – Kashyap Patel Jul 07 '21 at 15:31
  • @KashyapPatel We are no longer supporting the Fax API and it will be closed down by the end of this year. New accounts created after we made that announcement do not have access to the Fax API and Twilio recommends you use one of the services listed in the link in my comment above. – philnash Jul 08 '21 at 01:11
0

Thank you for the help, Twilio blocked my account, however they enabled it since it was active before the cut off date.