Your bot can interact with users using various types of messages provided by the LINE Platform.

Message categories

Messages sent with the Messaging API can be divided into two categories: reply messages and push messages.

Reply messages are messages that you can send only after a user-generated event such as when the user sends your bot a message or adds your bot as a friend. To send reply messages, you must have a reply token which is included in a webhook event object. For more information, see Send reply message in the Messaging API reference documentation.

Push messages are messages that you can send to users at any time. Use the /message/push endpoint to send messages to a single user and the /message/multicast endpoint to send messages to multiple users.

Note: Push messages are limited to certain plans. For more information about plans, see LINE@ plans.

Message types

Use the following types of messages to create interactive experiences for your users.

For more detailed information about messages, see Message objects in the Messaging API reference documentation.

Text message

To send a text message include the text in a message object.

Text message

You can include LINE original emoji in text messages using character codes. For a list of LINE emoji that can be sent in LINE chats, see the emoji list.

Emoji

For more information, see Text message in the Messaging API reference documentation.

Sticker message

You can use stickers to make your bot more expressive and engaging for your users. To send a sticker, include the package ID and sticker ID of the sticker in a message object. For a list of stickers that can be sent with the Messaging API, see the sticker list.

Sticker message

For more information, see Sticker message in the Messaging API reference documentation.

Image message

To send images, include URLs of the original image and a smaller preview image in the message object. The preview image is displayed in the chat and the full image is opened when the image is tapped. Note that the URLs must use HTTPS.

Image message Full image message

For more information, see Image message in the Messaging API reference documentation.

Video message

To send a video, include the URL of the video file and the URL of a preview image in the message object. The user can play the video by tapping on the preview image. Note that the URLs must use HTTPS.

Video message

For more information, see Video message in the Messaging API reference documentation.

Audio message

To send an audio file, include the URL of the file and the duration in the message object. Note that the URL must use HTTPS.

Audio message

For more information, see Audio message in the Messaging API reference documentation.

Location message

To send your location information to users, include a title, address, and latitude and longitude coordinates in the message object.

Location message

For more information, see Location message in the Messaging API reference documentation.

Imagemap message

Imagemap messages consist of an image with specified tappable areas that correspond to different actions.

To send an imagemap, provide the image in multiple resolutions to support different devices. You must specify the base URL and the base size of the image. You can then define tappable areas on the image which redirects the user to a link or sends a specified text message from your user to your bot.

Imagemap message

For more information, see Imagemap message in the Messaging API reference documentation.

Template messages

Template messages have predefined layouts that help you create richer experiences for your users. Use actions to make it easier for users to interact with your bot. Rather than have the user type a message, a specific action can be executed with a single tap.

For more information about template messages, see Template messages in the Messaging API reference documentation.

Template message types

Here are the types of templates available.

Buttons template

Use the buttons template to send a message with an image, title, text and multiple action buttons. In addition to having buttons, you can also indicate a single action to be executed when a user taps anywhere in the image, title, or text area.

Buttons template message

For more information, see Buttons template in the Messaging API reference documentation.

Confirm template

Use the confirm template to send a message with two buttons.

Confirm template message

For more information, see Confirm template in the Messaging API reference documentation.

Use the carousel template to send a message with multiple column objects that users can cycle through. In addition having buttons, you can also indicate in each column object a single action to be executed when a user taps anywhere in the image, title, or text area.

Carousel template message

For more information, see Carousel template in the Messaging API reference documentation.

Use the image carousel template to send a message with multiple images that users can cycle through.

Image carousel template message

For more information, see Image carousel template in the Messaging API reference documentation.

Flex Message

Flex Messages are messages with a customizable layout. You can customize the layout freely by combining multiple elements.

Flex Message sample

For more information, see Using Flex Messages, and Flex Message in the Messaging API reference documentation.

Common features

This section explains features that are common to the various message types.

Quick reply

When a user receives a message that contains quick reply buttons, those buttons appear at the bottom of the chat screen. The user can simply tap one of the buttons to reply to your bot.

Quick reply sample

You can use quick reply buttons with any message type.

For more information, see Using quick replies, and Quick reply in the Messaging API reference documentation.