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 type | Supported formats | Mimetype | Supported size maximum |
|---|---|---|---|
| Image | png, jpeg, jpg, gif | image/png, image/jpeg, image/jpg, image/gif | 200MB |
| Video | mp4 | video/mp4 | 200MB |
| Document | doc(x), xls(x), csv, txt, pdf | application/msword, application/vnd.ms-excel, text/csv, text/plain, application/pdf | 200MB |
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
- Line
- Signal
- Telegram
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"
}
}
]
}
}
]
}
}
Updated 2 days ago