LINE
Our business messaging API supports sending and receiving LINE messages.
Being able to send LINE messages requires requesting access via the Channels portal. Without onboarding LINE via the portal, you can not make use of this part of the API.
Fact sheet
Feature | Support | Remarks |
---|---|---|
text messages | yes | The maximum length of a LINE message is 5.000 characters, and it must be UTF-8 encoded. |
media | yes | The media name attribute should end in the proper file extension. Only one media file is allowed per message. When the linked media doesn't exist/can't be found, the message will not be sent at all. |
media: images | yes | Maximum file size for an uploaded image is 10 MB. Supported formats: png, jpeg and jpg. |
media: videos | yes | Maximum file size for an uploaded image is 200 MB. Supported formats: mp4. |
media: audio | no | |
rich card message | no | |
rich card carousel | no | |
quick replies | no | |
sticker message | no | |
location message | no |
Onboarding
Onboarding pages for LINE are in development, in the meantime you are welcome to onboard for LINE via your customer success manager.
Sending messages
Input matrix
Text | Media | Suggestions | Header | Output |
---|---|---|---|---|
x | x | x | x | Not supported |
√ | x | x | x | Text message |
x | √ | x | x | Media message |
Text
Direct message with plain text content

The example below will send a simple text-only LINE message.
{
"messages": {
"authentication": {
"producttoken": "Your product token"
},
"msg": [
{
"from": "Your Channel ID",
"to": [
{
"number": "Recipients ID"
}
],
"allowedChannels": [
"Line"
],
"body": {
"content": ""
},
"richContent": {
"conversation": [
{
"text": "CM.com - Be part of it."
}
]
}
}
]
}
}
Media
Media type | Supported formats | Mime type | Supported size maximum |
---|---|---|---|
Image | png, jpeg, jpg | image/png, image/jpeg, image/jpg | 10MB |
Video | mp4 | video/mp4 | 200MB |
Direct message with image

In the example below, we send a simple rich content message that contains an image.
{
"messages": {
"authentication": {
"producttoken": "Your product token"
},
"msg": [
{
"from": "Your Channel ID",
"to": [
{
"number": "Recipients ID"
}
],
"body": {
"content": ""
},
"allowedChannels": [
"Line"
],
"richContent": {
"conversation": [
{
"media": {
"mediaName": "your-image.jpg",
"mediaUri": "https://your-image-url.jpg",
"mimeType": "image/jpg"
}
}
]
}
}
]
}
}
Direct message with video

In the example below, we send a simple rich content message that contains a video.
{
"messages": {
"authentication": {
"producttoken": "Your product token"
},
"msg": [
{
"from": "Your Channel ID",
"to": [
{
"number": "Recipients ID"
}
],
"body": {
"content": ""
},
"allowedChannels": [
"Line"
],
"richContent": {
"conversation": [
{
"media": {
"mediaName": "your-video.mp4",
"mediaUri": "your-video-url.mp4",
"mimeType": "video/mp4"
}
}
]
}
}
]
}
}
Receiving messages / Inbound flow
Since LINE is used for 2-way communication (chat) it is important to also implement an Inbound flow. You can find more information about how to do this using our API documentation of the Inbound webhook.
Updated 8 days ago