Skip to main content

Media Uploader

Normally, when you want to create an image response, you can just directly paste the image URL in the response section. However, if you look close enough, you will notice that the Facebook chatbot takes long time to send out the image even though the image size is just a few hundreds KB. Sometimes, you will not be able to receive the image if its size is even bigger.

Is there anyway we can make sure our media files get delivered to our end customers swiftly? Yes, that's the Attachment ID.


What is Attachment ID?

Attachment ID & URL in image response
Attachment ID & URL in image response

In the response of any kind of media files, you will be able to see two fields: URL and Attachment ID.

Attachment ID is a unique ID string that belongs to a media file (i.e. images, videos, audios & files) under each Facebook page. Using Attachment ID to send media files out, it reduce the long uploading & sending time and allows you to resend the uploaded assets for multiple times.


Generate Attachment ID for Facebook

Reminder

Users should create a Facebook Integration before being able to use the Attachment ID Uploader.

  1. In Bot Builder, click on the Facebook icon to open up the Attachment ID Uploader.
  1. Upload a media file using either URL or Local File; select the corresponding Facebook Page and File Type. Click "Upload" to start uploading the file.
tip

You must select the SAME file type as your uploaded media file. If there is any mismatch in the file type, the file would not be sent in the chatbot.

  1. After completion, you can head to "Attachment History" to check out all the media files you have uploaded. The Attachment ID can be extracted here.
tip

Each Attachment ID is only applicable to one Facebook page, other Facebook pages could not use the same Attachment ID to get the same image.


Generating Media ID for WhatsApp

You can do the same with WhatsApp Cloud API. Media ID is just the attachment ID specific to WhatsApp platform.

NOTE

Users should create a WhatsApp Cloud Integration before being able to use the Attachment ID Uploader.

  1. In Bot Builder, click on the WhatsApp icon to open up the Media ID Uploader.
  1. Upload a media file as Local File; select the corresponding WABA Account and File Type. Click "Upload" to start uploading the file.
tip

You must select the SAME file type as your uploaded media file. If there is any mismatch in the file type, the file would not be sent in the chatbot.

  1. After completion, you can head to "Media History" to check out all the media files you have uploaded. The Media ID can be extracted here. Besides, you can check the uploaded date and expiry date of the ID.
tip
  • Each Media ID is only applicable to one WABA account, other WABA could not use the same Media ID to get the same image.
  • Each Media ID will last for 30 days since the date of uploading. Upon expiry, you will need to upload the media again in order to obtain another set of media ID.