SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Creating WhatsApp content template for media files not working for DOCS and XLSX files

Issue

Creating WhatsApp content template media files not working for DOCS and XLSX file type.

 

Product

Programmable Messaging, WhatsApp

 

Cause

Creating WhatsApp content template media files only works for PDF files, if you specify DOCS and XLSX files, it will not work.  For example if you try to create a media file in whatsapp/card template with excel or doc file, you will get the template rejected with the error below.

Example that does not work with excel file:

"media": ["https://twilio-cms-prod.s3.amazonaws.com/{{1}}"] would include a path sample in the variables definition. "variables": {"1": "/templates/files/test.xlsx"}

Rejected error reason :INVALID_FORMAT. Error processing media URLs for the template with sid HX61dfe34d73491659a204c3267657765b due to the following error: Media content type `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` is not supported for templates

Example that works with pdf file: 

"media": ["https://twilio-cms-prod.s3.amazonaws.com/{{1}}"] would include a path sample in the variables definition. "variables": {"1": "/templates/files/test.pdf"}

Resolution

Excel files and word docs are not supported at this time for content template creation for media files.Only supported file format is pdf file as per Meta documentation.  You can only send excel files and word documents in freeform messages and not through content template. 

 

Additional Information 

As per Meta documentation on the (parameter object) section, only pdf documents are supported when creating content template for media files. See screenshot below.

document 
Required when type=—. 
A media object 01 type document. Only PDF documents are supported for media- 
based message templates. Captions not supported when used in a media template.

 

Have more questions? Submit a request
Powered by Zendesk