Messages
A chat message can have any of these types: Text
, Buttons
, Menu
, Reaction
, Location
, Image
, Audio
, Video
, Document
, Custom
,
Text
A simple text message.
Buttons
A message with interactive buttons. The style and constraints for buttons vary for the different servers that are used to deliver the message to the user, e.g. messages on WhatsApp Cloud can contain a maximum number of 3 buttons, if you have more choices, you have to use a Menu
.
You can display a normal text message with content
before the buttons.
A button consists of a technical command
and a user-visible title
. Most channels respond with both, when the user pushes one of the buttons, some might just return the command
.
Menu
A message with an interactive list of choices. The choices are usually only displayed after the click on a button. This button can have a title
.
You can display a normal text message with content
before this button.
The choices can be grouped into sections.
Reaction
Location
Media
Media messages usually contain binary data. The message contains only the URL, which you can use together with the IMediaServer
to download the raw data.
Image
An image.
Audio
An audio message.
Video
A video message.
Document
A proprietary document format, could be an office document, a PDF or any other potentially binary format.
Custom
You can use opaque custom messages in your own server implementation.