Sending messages
The Channels API supports many of the features of Line; however, due to the omni-channel nature of the API, there may be some differences between the Channels API message and the native Line API.To send a Line message, you must have an active Line channel and perform an HTTP request to the following endpoint with a valid access key
Send a message to a channel
Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')
The ID of the workspace
The ID for a channel
Message was accepted for processing
The request did not pass validation
The request did not pass validation
Creating the message was not possible because of conflicting conditions
The request did not pass validation
When sending outbound messages as well as setting the receiver information you must set message body field in all cases
Body
You can send messages to users who have added your LINE Official Account as a friend or in group chats and multi-person chats that your LINE Official Account has joined. Additionally, you can send messages to users who have sent a message to your LINE Official Account within the past seven days.
The Channels API supports many of the features of Line; however, due to the omni-channel nature of the API, there may be some differences between the Channels API message and the native Line API. Here is an overview of the Line message types and Channels API message types:
text
image
audio / video
location
sticker
-
imagemap
-
template - buttons
template - confirm
-
template - carousel
template - image carousel
-
flex message
Outbound messages
Text
Text message
![]()
Text message with emoji
To include an emoji in a text message, specify the product ID and emoji ID within the text message object. Set the index, productId, and emojiId properties, as shown in the example below. These properties can be found in text.metadata.line.emoji.items. Refer to the official documentation for detailed LINE emoji definitions.
![]()
Text message with reply buttons

Text message with postback actions

Text message with reply and postback actions

Text message with location request

Image
Single image message

Single image message with text

Multiple image message

Single image message with postback actions

Single image message with label and reply actions

Single image message with label, postback and reply actions

Multiple images message with labels and postback actions

Multiple images message with reply actions

Multiple images message with labels, postback and reply actions

File
Single file message

Multiple files message

Location

Carousel
Single card with title, description and actions

Single card with image, title, description and actions

Multiple cards with title, description and actions

Multiple cards with image title, description and actions

List
List message without sections

ReplyTo
You can send any outbound message as a reply to a previous message by setting the replyTo object as shown below. The replyTo.id should be set to the id of a received message and the replyTo.type should be set to "message".
ReplyTo with a text message

Last updated
Was this helpful?

