Your bot can interact with users using various types of messages provided by the LINE Platform. Use the following types of messages to create interactive experiences for your users.
For more detailed information about messages, see the Message objects reference documentation.
Reply and push messages
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 the Send reply message 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.
To send a text message include the text in a message object.
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.
For more information, see the Text message reference documentation.
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.
For more information, see the Sticker message reference documentation.
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.
For more information, see the Image message reference documentation.
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.
For more information, see the Video message reference documentation.
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.
For more information, see the Audio message reference documentation.
To send your location information to users, include a title, address, and latitude and longitude coordinates in the message object.
For more information, see the Location message reference documentation.
Imagemap messages consist of an image with specified tappable areas that correspond to different links or 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.
For more information, see the Imagemap message reference documentation.
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 detailed information about template messages, see the Template messages reference documentation.
Template message types
Here are the types of templates available.
Use the buttons template to send a message with an image, title, text and multiple action buttons. In addition having buttons, you can also indicate a single action to be executed when a user taps anywhere in the image, title, or text area.
For more information, see the Buttons template reference documentation.
Use the confirm template to send a message with two buttons.
For more information, see the Confirm template 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.
For more information, see the Carousel template reference documentation.
Image carousel template
Use the image carousel template to send a message with multiple images that users can cycle through.
For more information, see the Image carousel template reference documentation.
You can set different types of actions for your bot to take when a user taps a button or an image in a message. The following actions can be used in messages.
Use the postback action to return a specified string in a postback event to your server. You can also include text which is sent as a message from the user.
For more information, see the Postback action reference documentation.
Use the message action to send a specified string as a text message from the user.
For more information, see the Message action reference documentation.
Use the URI action to redirect the user to a specified URI.
For more information, see the URI action reference documentation.
Datetime picker action
Use the datetime picker action to let the user choose a specific date, time, or date and time from a menu. The date and time selected by the user is returned in a postback event via a webhook.
For more information, see the Datetime picker action reference documentation.
To see detailed information about how to send messages, see the Message objects reference documentation.
Questions or suggestions?
If you have any questions about our LINE Platform products, first check our FAQ page and Community site. To share suggestions or feature requests regarding the documentation or the LINE Platform, click the buttom below or create an issue on the LINE Platform feedback GitHub repository.