Media messages

Overview

Media messages allow you to send visual and document content to enhance your communication on Viber. All media messages require to be secured HTTPS URLs that include the proper file extension and are not protected by captcha. Each media file has a maximum size of 200 MB, and only one media file is allowed per message. Media messages containing images or videos are categorized as promotional. Media messages containing files are categorized as transactional.

Rules and restrictions

Viber supports three types of media:

Media typeSupported formatsMimetypeSupported size maximum
Imagepng, jpeg, jpg, gifimage/png, image/jpeg, image/jpg, image/gif200MB
Videomp4video/mp4200MB
Documentdoc(x), xls(x), csv, txt, pdfapplication/msword, application/vnd.ms-excel, text/csv, text/plain, application/pdf200MB

URL requirements

Viber inquires the following requirements that apply to using (image) URLs

  • Only use secured HTTPS links
  • Make sure that image URLs are not protected by a captcha
  • Make sure the image URLs include file extensions (For example: .mp4, .png, .jpeg)
  • Links to one of the following apps are not allowed
    • Facebook
    • Instagram
    • Line
    • Signal
    • Telegram
    • WhatsApp

Image message example

In the example below we send a simple rich content message that contains both text and an image. (Image only is also possible)

{
  "messages": {
    "msg": [
      {
        "from": "Your sender",
        "to": [
          {
            "number": "Phone number"
          }
        ],
        "allowedChannels": [
          "Viber", "SMS"
        ],
        "body": {
          "type": "auto",
          "content": "SMS fallback Text"
        },
        "richContent": {
          "conversation": [
            {
              "text": "CM.com - Be part of it.",
              "media": {
                "mediaUri": "https://www.cm.com/cdn/cm/cm.png",
                "mimeType": "image/png",
                "mediaName": "cm.png"
              }
            }
          ]
        }
      }
    ]
  }
}

Video message example

In the example below, we send a simple rich content message that contains both text and a video. (Video only is also possible)

{
  "messages": {
    "msg": [
      {
        "from": "Your sender",
        "to": [
          {
            "number": "Phone number"
          }
        ],
        "allowedChannels": [
          "Viber", "SMS"
        ],
        "body": {
          "type": "auto",
          "content": "SMS fallback Text"
        },
        "richContent": {
          "conversation": [
            {
              "text": "CM.com - Be part of it.",
              "media": {
                "mediaUri": "your-video-url.mp4",
                "mimeType": "video/mp4",
                "mediaName": "your-video.mp4"
              }
            }
          ]
        }
      }
    ]
  }
}

Document message example

In the example below we send a simple rich content message that contains a document. (Document only is also possible)

{
  "messages": {
    "msg": [
      {
        "from": "Your sender",
        "to": [
          {
            "number": "Phone number"
          }
        ],
        "allowedChannels": [
          "Viber", "SMS"
        ],
        "body": {
          "type": "auto",
          "content": "SMS fallback Text"
        },
        "richContent": {
          "conversation": [
            {
              "text": "CM.com - Be part of it.",
              "media": {
                "mediaUri": "your-document.pdf",
                "mimeType": "application/pdf",
                "mediaName": "your-document.pdf"
              }
            }
          ]
        }
      }
    ]
  }
}