Media message

A media message is a message that features some kind of media other than text, such as images, documents, or video. You can send a media message by making a POST request to the /messages:send Conversation API endpoint with the following payload:
{
  • "app_id": "{{APP_ID}}",
  • "recipient": "{{CONTACT_ID}}",
  • "message": {
    • "media_message": {
      }
    }
}

Media message schema

A media message can take the following parameters and properties. Required parameters are marked.

object (Media Message)
url
required
string

Url to the media file.

thumbnail_url
string

An optional parameter. Will be used where it is natively supported.

filename_override
string

Overrides the media file name.

Note:

Not all channels support every parameter.

The following sections give examples of how card messages are rendered in each channel and specific parameter support:

WhatsApp

WhatsApp channel natively supports media messages and will automatically detect what type of WhatsApp message to use.

Supported Media Types

In MediaMessage you can send the following media types:

  • image: image/.jpeg, image/.png (post-processing size limit of 5 MB)
  • video: video/.mp4, video/.3gpp (Only H.264 video codec and AAC audio codec is supported with a single audio stream, post-processing size limit of 16 MB)
  • document: any valid document MIME type (post-processing size limit of 100 MB)
  • audio: audio/.aac, audio/.mp4, audio/.amr, audio/.mpeg, audio/.ogg + codecs=opus (post-processing size limit of 16 MB, base audio/.ogg not supported)
  • sticker: image/.webp (post-processing size limit of 100 KB)

Any other media type will be sent as plaintext URL.

Note that document media types support the filename_override parameter, which allows you to replace the original file name of the media with a new one.

The following image gives an example of a media message.

Media Message with Image

SMS

SMS channel supports image-based media messages natively. The following image gives an example of media messages.

Media Message

Facebook Messenger

Facebook Messenger supports media messages natively for the following media types:

  • image
  • video
  • audio
  • document

The following image gives an example of a media message.

Media Message with Image

Instagram

Instagram only supports image-based media messages natively.

Supported formats are: jpg, png, ico, bmp. The image size should be than 8 MB.
Note

Until Instagram enables sending other types of media beyond images, we will transcode your "Media Message" as a “Text Message” with a plain text URL that points to the document/video file.

The following image gives an example of a media message.

Media Message

Apple Messages for Business

Apple Messages for Business supports image-based media messages as an attachment and Rich Link. Attachment fits better in media messages.

Media Message

MMS

MMS supports media messages natively. The content of the media message will be validated when sending messages, and checked against the recommendations for MMS messages listed in the MMS documentation if you use the MMS_STRICT_VALIDATION flag.

In this message you can send the following media types on MMS channel:

  • image: .jpg, .png (please observe that .jpg files have wider support on mobile devices than .png files)
  • video: .mp4, .gif, .mov
  • vCard (Virtual Contact File): .vcf
  • PDF files: .pdf

We recommend you to keep media file sizes under 1MB as MMS providers usually use this limit.

The following image gives an example of a media message.

Media Message

RCS

RCS channel natively supports Media Messages. Send a media message by specifying the URL to the media. Conversation API will automatically detect what type of RCS message to use - image or video.

Note:

When a mobile terminated (MT) media message is sent on the RCS channel of the Conversation API, the media located at the corresponding URL may be cached for up to 28 days. If you change the media stored at the URL, the new media may not be reflected in MT messages referencing that URL that are sent within that 28-day period. To force an update of the media cache, rename the file referenced by the URL.

The following image gives an example of a media message.

Image Media Message

Viber Bot

Viber Bot channel natively supports media messages.

In this message you can send the following media types on Viber Bot channel:

  • image: .jpeg, .png, non-animated .gif
  • video: .mp4 with H264 encoding
  • document: any valid document MIME type

The following image gives an example of media messages.

Media Message

Viber Business Messages

Viber Business Messages supports media messages natively.

Supported image types:

  • .jpg
  • .jpeg
  • .png

Supported document types:

  • .doc
  • .docx
  • .rtf
  • .dot
  • .dotx
  • .odt
  • .odf
  • .fodt
  • .txt
  • .info
  • .pdf
  • .xps
  • .pdax
  • .eps
  • .xls
  • .xlsx
  • .ods
  • .fods
  • .csv
  • .xlsm
  • .xltx

Documents and media sent using media messages must be less than 200MB in size.

When sending a video media message, the following additional requirements apply:

  • The thumbnail_url must be set. See the media message schema for more information.
  • The thumbnail URL can be a maximum of 1000 characters.
  • The HTTP server that provides the video needs to set Content-Length in the HEAD response.
  • The video duration must be less than 600 seconds.

The following image gives an example of a media message.

Image Media Message

Telegram

Telegram Bot channel natively supports various type of media messages.

  • image: image/.jpeg, image/.jpg, image/.png
    png
  • Video: video/.mp4
    mp4
  • Audio: audio/.mp3, audio/.m4a, audio/.ogg, audio/.ocg
    ogg
  • File: application/.zip, application/.pdf
    zip pdf

KakaoTalk

The KAKAOTALK and KAKAOTALKCHAT channels support Media messages natively.When sending Media messages as AlimTalk Template messages or FriendTalk messages on the KAKAOTALK channel, the supported image media types are .png and .jpg.

Media included in the Media message will be rejected by the channel if:

  • the width is below 500px, or if the 'width:length' ratio is below 2:1, or above 3:4 or if the image dimension is not equal to [800px * 600px]
  • image file format is different than JPG or PNG
  • file size is bigger than 500KB or for image with dimension [800px * 600px] is bigger than 2MB
When sending Media messages as ConsultationTalk messages on the KAKAOTALKCHAT channel, the supported image media types are .gif, .png, and .jpg.

Media included in the Media message will be rejected by the channel if:

  • file size is larger than 5MB

LINE

LINE channel natively supports various type of media messages.

Media file URL must be HTTPS over TLS 1.2 or later.

  • Image formats: jpeg, jpg, png
    Max image file size: 10MB
    png
  • Video formats: mp4
    Video thumbnail image is required (Tip: use a 1-pixel transparent image as the universal thumbnail)
    Max video file size: 200MB
    Max thumbnail image size: 1MB
    mp4
  • Audio formats: m4a
    Max audio file size: 200MB
    m4a

WeChat

WeChat channel natively supports various types of media messages.

  • Image formats: jpeg, jpg, png, gif
    Max image file size: 10MB
    png
  • Video formats: mp4
    Max video file size: 10MB
    mp4
  • Audio formats: mp3/amr
    Max audio file size: 2MB
    Max audio duration: 60s
    m4a
We'd love to hear from you!
Rate this content:
Still have a question?
 
Ask the community.