Customer Experience
...
WhatsApp Campaign
How Media Templates Work on WhatsApp Campaigns
7 min
sample media vs actual media when you create a whatsapp media template on the meta console, you are required to upload a sample media file (image, video, or document) this file is only used by meta during the template approval process and to generate a temporary preview url it is not the media that will be sent to end users during your campaigns this is one of the most common misunderstandings about media templates, so please read this section carefully creating a media template on meta console when creating a template you upload a sample media file on the exotel console or on the meta console meta uses this media only for review , layout validation , and preview meta stores this file as a temporary cdn media , typically in a format like https //scontent xx fbcdn net/ important this sample media file is never sent to your customers it cannot be used as the actual media in campaigns the sample url is temporary and it expires it is not publicly accessible cannot be used in real message delivery will be rejected by meta if passed during the send api should only be used for preview inside our dashboard what happens in the ui (campaign dashboard) template selection when you select a media template inside our campaign dashboard we fetch the template using meta’s api we display the media using the temporary meta cdn url the preview on the right side is view only this preview helps you confirm the layout of the template before sending final step mandatory media url input on the final step of the campaign creation we pre populate the preview url using meta’s cdn url only for reference this helps you visually verify that you are working with the correct template but you must replace this url with an actual, valid public url before sending why? meta does not accept its temporary preview urls when delivering real messages using the preview url (https //scontent xx) will cause campaign failure what is a “valid media url”? your media url must meet meta’s delivery requirements publicly accessible (no login, no session token) served over https permanent / non expiring correct file format (jpeg, png, pdf, mp4 depending on template type) invalid urls include scontent xx fbcdn net/ (meta preview url) urls behind authentication urls with ip whitelisting file paths (e g , c /users/ ) expiring file sharing links (google drive/private s3 links without proper acls) how to create a valid media url? you can host the media file in any publicly available servers (your in house s3) or using our in house media management feature (recommended) to simplify valid media hosting, we offer a built in media management feature you can use it to upload your media file once generate a permanent, public, https media url or meta id reuse the same url across multiple campaigns avoid re uploading files repeatedly use the same url in both ui campaigns and api campaigns steps go to media management upload your image/video/document copy the generated media url paste it in the campaign builder while sending your template save and reuse for all future campaigns this ensures 100% compliance with meta’s media delivery guidelines ui users mandatory rule for ui users if your template contains media, providing a valid media url is mandatory you must replace the default scontent xx preview url with your valid hosted url campaigns will fail if you skip this our system cannot use the preview media provided during template creation because meta does not allow it for outbound delivery api users how to send media templates correctly for api based campaigns the same rules apply meta requires a valid public url in the api request the media file from template creation is not considered during api sends refer to the apis https //documenter getpostman com/view/20716057/2s93xtzjxk#484c19df 993f 49c0 821d ddf383efbc8d api requirement you must populate the media parameter example (image template) curl location g 'https //{{base url}}/campaign/external/push campaign/' \ data '{ "campaign name" "campaign name", "batch name" "batch name", "template name" "template name", "language code" "english (en)", "whatsapp bsp" "1", "media send type" "static", "media url" "media url", "channel id" "1", "client data" \[ { "phone number" "+91920xxxxxx46", "name" "ram" }, { "phone number" "+91920xxxxxx46", "name" "shayam" } ] } ' important for developers media url or the header media link is mandatory do not send the default meta cdn url do not assume the media uploaded during template creation will be reused always host the image or use our media management url
🤔
Have a question?
Our knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.
