Loading

Walkthrough of WhatsApp Template Creation and Media upload APIs for Carousel Images

Fecha de publicación: Aug 27, 2025
Descripción

This is a document that goes over the API configuration for Whatsapp API message creation, particularly for Whatsapp Carousel Messages

Solución

 

1.  Create a Meta App

To utilize Meta's APIs, start by creating an app:

2. Upload Media via Graph API

To send media-rich messages, upload files using the Graph API:https://developers.facebook.com/docs/graph-api/guides/upload

  • Start Upload Session: Initiate an upload session by sending a POST request to /<APP_ID>/uploads with parameters like file_name, file_length, and 

  • Upload File: Use the session ID to upload the file in chunks, resuming if necessary.

  • Publish Media: After successful upload, use the returned file handle to publish the media. 

3. WhatsApp Message Templates creation

To create whatsapp message templates:

  • Create Template: Send a POST request to /<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_templates with details like name, category, language, and components. developers.secure.facebook.com

  • Template Components: Define components such as BODY, BUTTONS, and CAROUSEL. For carousels, specify HEADER, BODY, and FOOTER for each card.(Carousel Template creation)

    • For each card, use the file handle obtained from previous media upload API to successfully create the carousel template.

4. Best Practices

  • High-Quality Media: Ensure images and videos are of high resolution and optimized for mobile devices.

  • Clear Call-to-Action: Incorporate buttons like "Buy Now" or "Learn More" to drive user interaction.

  • Localized Content: Provide translations for different languages to reach a broader audience.

Número del artículo de conocimiento

005134936

 
Cargando
Salesforce Help | Article