Message → Send
AI-generatedSummary
Send a message to a specific Viber user by specifying the receiver's user ID and the message content and type.
Inputs
- Receiver (required) — The unique Viber user ID of the receiver.
- Message Type (required) — The type of message to send, e.g., text, picture, video, file, contact, location, sticker, rich media, or URL.
- Text (required) — The text content of the message when Message Type is text.
- Media URL (required) — The HTTPS URL of the media file (required for picture, video, file, and URL message types).
- Caption — An optional description of the picture (only for picture message type).
- Thumbnail URL — The HTTPS URL of the picture thumbnail (JPEG/PNG, max 100kb, only for picture messages).
- Rich Media JSON (required) — The JSON object or a JavaScript object defining carousel cards and buttons (required for rich_media message type).
- File Size (Bytes) (required) — The size of the video or file in bytes (required for video and file message types).
- Video Duration (Seconds) — The duration of the video in seconds, max 600 seconds (only for video message type).
- File Name (required) — The filename including extension (e.g., document.pdf) for file message type.
- Latitude (required) — Latitude coordinate for location message type.
- Longitude (required) — Longitude coordinate for location message type.
- Contact Name (required) — The contact name for contact message type.
- Contact Phone Number (required) — The contact phone number for contact message type.
- Sticker ID (required) — The unique sticker ID for sticker message type.
- Additional Fields — Optional parameters including sender avatar URL, sender name, tracking data, minimum API version, and a Viber Keyboard JSON object to attach to the message.
Output shape
a single record containing the API response JSON for the sent message.
The output includes the JSON response from the Viber Bot API for each message sent. Errors throw exceptions unless 'Continue On Fail' is enabled, which then returns the error message in the output JSON for that item.
Examples
Example 1: Send a plain text message to a Viber user
Set Resource to 'Message', Operation to 'Send', enter the Receiver user ID, select Message Type 'Text', and provide the Text content.