Upload file to Meta

Overview

If the template includes media in the header, the process involves an additional step. First, the partner must send the media to Meta to get a hashed URL. In response meta will return a media link. This media link must then be added to the template's header payload, along with the partner-token and auth-token, before submitting the complete template to Meta.

After submission, Meta will review the template, including the media if applicable, and provide an approval status to the partner. If the template is approved, it becomes available for use. In case of rejection, the partner must review the feedback, make necessary adjustments, and resubmit the template.


How to get the Partner Access Token?   

In order to get partner access token you can write an email to partners@easysocial.io and we will be happy to share a partner access token with you.

How can a Business generate a Token?  

If you're unsure how to generate a token, click here

 

POST 

https://api.easysocial.in/partners//wa-templates/facebook/upload-file


Example Request

curl --location '/wa-templates/facebook/upload-file' \
--header 'partner-token;' \
--header 'auth-token;' \
--form 'file=@"/C:/Users/rudan/Downloads/WhatsApp Image 2022-09-26 at 9.48.50 AM.jpeg"'


Example Response

{
  "status": 200,
  "success": true,
  "message": "success",
  "payload": "4::aW1hZ2UvanBlZw==:ARbaHye-JEFpS3-WwOsFjWEzV51vKzqRqVpC0xaaWwCYtaqBI3NtojY_T_86Guc9DWF7i6p4rXHTrvhPt8tjks93XKn3ybs0GklQ2nbqQ4KpqQ:e:1708753209:710443647598780:100092491120887:ARaQ0q_DC8nGU8irH9o"
}

 

NOTE: The template cannot be edited via API. To make any changes business must go to their WhatsApp business manager and edit the template. Alternatively, you can make a new template with the required changes.


This process ensures that all templates meet Meta’s guidelines and are fully prepared for integration into WhatsApp workflows.