post https://connect.routee.net/viber
Send Viber message to single recipient. This is a paid service.
RESPONSE PARAMETERS
KEY | DESCRIPTION |
---|---|
trackingId | The tracking Id of the Viber message. It is used to identify the message. |
to | The recipient's phone number. |
from | The name of the sender Id. Identifies from whom the message is sent. |
country | Country name of the recipient's phone number. |
status | Information about the status of the VIber message. |
status.status | The current status of the Viber message. Check here for possible values. |
status.date | The updated date of the status. |
applicationName | The name of the application that was used to send this message. |
direction | The direction of this message (outbound or inbound). |
ttl | Time range until message expires. TTL range in seconds: 30 - 86400 seconds. If it is not set, the default range is 14 days. |
message | The text of the Viber message. |
imageUrl | The URL of the image (recommended image size: 400KB for optimal delivery; image URL length: max 1000 characters; only valid and secure URL starting with https://). |
viberAction | Represents the action (button) of the Viber message. |
viberAction.caption | The displayed text on the button. |
viberAction.targetUrl | The target URL of the viber action. |
viberFile | Represents the file of the Viber message. |
viberFile.fileName | The name of the file. |
viberFile.fileType | Type of Viber message file. |
viberFile.fileUrl | The URL of the of the Viber message file (recommended file size: 600KB for optimal delivery). |
viberVideo | Represents the Viber video of the Viber message. |
viberVideo.videoURL | The URL where the video is hosted (1000 max chars, only https). To ensure that all videos will be validated and become downloadable, each video’s server host must allow Viber’s client to verify the file header to make sure the file meets Viber’s technical requirements. A video that will not allow headers investigation might not allow users that receive it to download the file or play the content. The video file must be hosted on a server that allows HEAD methods and includes the file “Content-Length“ in the server reply. |
viberVideo.videoThumbnail | The URL of a thumbnail for the video (1000 max chars, only https). |
viberVideo.fileSize | The file size in MB (positive number, 200 max). |
viberVideo.duration | The video’s duration in seconds (positive number, 600 max). |
sessionMessage | Indicates a Viber Single is a Viber Session if the value is true. False by default. Learn more about session messaging at our documentation. |
ERROR CODES
STATUS | CODE | DESCRIPTION |
---|---|---|
400 | 400001009 | "Insufficient balance and remaining wallet amount. Remaining Balance : {}." Balance as well as the amount of the wallet are insufficient. |
400 | 400001009 | "Insufficient balance. Remaining Balance : {}" Insufficient balance. No wallet in this case. |
400 | 400020006 | "The senderInfo is paused. SenderInfoTrackingId: {}" Status of the sender info is paused. |
400 | 400019021 | "Invalid viber tracking with MessageId : {}" Incorrect data in the Viber tracking. |
400 | 400000000 | The provided image URL should be valid. |
400 | 400000000 | The image URL length must be up to 1000 characters. |
400 | 400000000 | The provided image URL should be secure, starting with https://. |
400 | 400000000 | The value of ttl must be less than or equal to 86400. |
404 | 404020001 | The sender ID is not correct. |
400 | 400019002 | (errorCode: 019) Invalid file type (e.g. HTML) The supported file types are following: For document: doc, .docx, .rtf, .dot, .dotx, .odt ,odf, .fodt, .txt, .info; For PDF: pdf, .xps, .pdax, .eps; For Spreadsheet: .xls, .xlsx, .ods, .fods, .csv, .xlsm, .xltx . |
400 | 400019002 | (errorCode: 016) File larger than 600 KB. |
400 | 400000000 | SRVC_BAD_THUMBNAIL In case the thumbnail URL is complied of more than 1000. |
400 | 400000000 | The size of the video file is bigger than 200MB. |
400 | 400000000 | The video duration is bigger than 600 seconds. |
400 | 400019002 | Viber Video message is not supported by Viber Session message. |
400 | 400019002 | Invalid Viber message type combination. Supported types are: Text, Image, File, Text + Action, Text + Action + Image, Video, Video+Text, Video+Text+Action. |