[英]Sending Twilio Fax from AWS S3 bucket
I'm trying to send a fax from the Twilio service.我正在尝试从 Twilio 服务发送传真。
S3 bucket is used to store a file and giving that URL as media_url. S3 存储桶用于存储文件并将 URL 作为 media_url。
from twilio.rest import Client
account_sid = 'ABCD'
auth_token = 'XYZ'
client = Client(account_sid, auth_token)
fax = client.fax.faxes \
.create(
from_='+15017122661',
to='+15558675310',
media_url='http://s3.amazonaws.com/bucket-A/Test/test.docx'
)
response:回复:
{"media_sid": null, "status": "failed", "direction": "outbound"}
What to do with the S3 bucket to fetch a file from S3?如何使用 S3 存储桶从 S3 获取文件?
Thank you.谢谢你。
Tried with media_url='http://s3.amazonaws.com/bucket-A/Test/test.pdf'
same response尝试使用
media_url='http://s3.amazonaws.com/bucket-A/Test/test.pdf'
相同的响应
Twilio developer evangelist here. Twilio 开发人员布道师在这里。
From your example, it appears you are trying to send an .docx
file.从您的示例中,您似乎正在尝试发送
.docx
文件。 Currently the Twilio Fax API only supports sending PDF files .目前Twilio 传真 API 仅支持发送 PDF 文件。 Can you try again with a PDF?
你能用 PDF 再试一次吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.