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.