Line
๐ Please see Messaging API for the full API reference.
Getting Startedโ
To start sending and receiving messages on LINE, you need a LINE Official Account with the Messaging API enabled.
Prerequisitesโ
- An 8x8 Connect account with Messaging Apps enabled. Sign up here if you haven't already.
- A LINE Official Account โ create one at the LINE Official Account Manager.
- Access to the LINE Developers Console at developers.line.biz.
Channel Setupโ
- In the LINE Official Account Manager, go to Settings > Messaging API and enable it.
- In the LINE Developers Console, navigate to your Messaging API Channel and retrieve your:
- Channel ID โ a unique identifier for your LINE channel
- Channel Secret โ a secret key used to generate access tokens
- Provide the Channel ID and Channel Secret to 8x8 โ contact your account manager or cpaas-support@8x8.com to configure the LINE channel on your sub-account.
Webhook Configurationโ
To receive inbound messages from LINE users:
- In the LINE Developers Console, go to your Messaging API Channel
- Under Webhook settings, set the Webhook URL to the URL provided by 8x8
- Enable Use webhook
๐ Contact cpaas-support@8x8.com to obtain the correct webhook URL for your account.
Sending a Text Messageโ
{
"user": {
"lineUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"type": "Text",
"content": {
"text": "Hello from 8x8 Messaging API"
}
}
Sending an Image Messageโ
{
"user": {
"lineUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"type": "Image",
"content": {
"url": "https://samplelib.com/png/sample-boat-400x300.png",
"image": {
"thumbnail": "https://samplelib.com/jpeg/sample-clouds-400x300.jpg"
}
}
}
| Field | Description |
|---|---|
content.url | URL of the full-size image |
content.image.thumbnail | URL of the thumbnail preview image |
Sending a Video Messageโ
{
"user": {
"lineUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"type": "Video",
"content": {
"url": "https://samplelib.com/mp4/sample-5s.mp4",
"video": {
"thumbnail": "https://samplelib.com/png/sample-boat-400x300.png"
}
}
}
| Field | Description |
|---|---|
content.url | URL of the video file |
content.video.thumbnail | URL of the thumbnail preview image |
Sending an Audio Messageโ
{
"user": {
"lineUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"type": "Audio",
"content": {
"url": "https://samplelib.com/mp3/sample-speech-5m.mp3",
"audio": {
"duration": 300
}
}
}
| Field | Description |
|---|---|
content.url | URL of the audio file |
content.audio.duration | Duration of the audio in seconds (required) |
Sending a Location Messageโ
{
"user": {
"lineUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"type": "Location",
"content": {
"location": {
"latitude": 1.285651,
"longitude": 103.847564,
"name": "8x8 Office Singapore",
"address": "One George Street, Singapore 049145"
}
}
}
| Field | Description |
|---|---|
content.location.latitude | Latitude of the location |
content.location.longitude | Longitude of the location |
content.location.name | Name or title of the location |
content.location.address | Street address of the location |
Receiving Inbound Messagesโ
When a LINE user sends a message to your LINE Official Account, 8x8 forwards it to your configured webhook URL.
๐ You can configure your callback using the Webhook Configuration API.
Inbound Webhook Formatโ
| Field | Type | Description |
|---|---|---|
eventType | string | Always inboundMessage for inbound messages |
channel | string | Always line for Line messages |
user.channelUserId | string | The LINE user ID of the sender |
umid | uuid | Unique message ID for the inbound message |
subAccountId | string | ID of the sub-account receiving the message |
timestamp | string | UTC date and time in ISO 8601 format |
type | string | Message type: Text, Image, Video, Audio, File, or Location |
content | object | Message content (varies by type) |
version | integer | Webhook format version |
recipient.recipientId | string | ID of the LINE channel that received the message |
Inbound Text Messageโ
{
"eventType": "inboundMessage",
"channel": "line",
"user": {
"channelUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"umid": "9e09ac86-bd74-5465-851d-1eb5a5fdbb9a",
"subAccountId": "yourSubAccountId",
"timestamp": "2026-06-18T05:15:30.00Z",
"type": "Text",
"content": {
"text": "Hello from LINE"
},
"version": 1,
"recipient": {
"recipientId": "7ee31a3f-9ed7-49f6-800f-a697e687553f"
}
}
Inbound Image Messageโ
{
"eventType": "inboundMessage",
"channel": "line",
"user": {
"channelUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"umid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"subAccountId": "yourSubAccountId",
"timestamp": "2026-06-18T05:16:10.00Z",
"type": "Image",
"content": {
"url": "https://s3.ap-southeast-1.amazonaws.com/wavecell.chatapps/20260618/18289/a1b2c3d4-e5f6-7890-abcd-ef1234567890.jpg?X-Amz-Expires=86400&..."
},
"version": 1,
"recipient": {
"recipientId": "7ee31a3f-9ed7-49f6-800f-a697e687553f"
}
}
๐ Media URLs (image, video, audio, file) are pre-signed S3 URLs that expire after 24 hours.
Inbound Video Messageโ
{
"eventType": "inboundMessage",
"channel": "line",
"user": {
"channelUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"umid": "e7dc3fb1-d2e5-404c-927c-b46d0056fa6e",
"subAccountId": "yourSubAccountId",
"timestamp": "2026-06-18T05:16:40.63Z",
"type": "Video",
"content": {
"url": "https://s3.ap-southeast-1.amazonaws.com/wavecell.chatapps/20260618/18289/e7dc3fb1-d2e5-404c-927c-b46d0056fa6e.mp4?X-Amz-Expires=86400&..."
},
"version": 1,
"recipient": {
"recipientId": "7ee31a3f-9ed7-49f6-800f-a697e687553f"
}
}
Inbound Audio Messageโ
{
"eventType": "inboundMessage",
"channel": "line",
"user": {
"channelUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"umid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"subAccountId": "yourSubAccountId",
"timestamp": "2026-06-18T05:17:10.00Z",
"type": "Audio",
"content": {
"url": "https://s3.ap-southeast-1.amazonaws.com/wavecell.chatapps/20260618/18289/b2c3d4e5-f6a7-8901-bcde-f12345678901.m4a?X-Amz-Expires=86400&..."
},
"version": 1,
"recipient": {
"recipientId": "7ee31a3f-9ed7-49f6-800f-a697e687553f"
}
}
Inbound File Messageโ
{
"eventType": "inboundMessage",
"channel": "line",
"user": {
"channelUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"umid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"subAccountId": "yourSubAccountId",
"timestamp": "2026-06-18T05:17:30.00Z",
"type": "File",
"content": {
"url": "https://s3.ap-southeast-1.amazonaws.com/wavecell.chatapps/20260618/18289/c3d4e5f6-a7b8-9012-cdef-123456789012.jpg?X-Amz-Expires=86400&..."
},
"version": 1,
"recipient": {
"recipientId": "7ee31a3f-9ed7-49f6-800f-a697e687553f"
}
}
Inbound Location Messageโ
{
"eventType": "inboundMessage",
"channel": "line",
"user": {
"channelUserId": "Ua12b345678c1de0fg1a1234567891011"
},
"umid": "46d27247-ecda-4bdd-8b17-b46d00575299",
"subAccountId": "yourSubAccountId",
"timestamp": "2026-06-18T05:17:55.35Z",
"type": "Location",
"content": {
"location": {
"longitude": 103.846375,
"latitude": 1.289563,
"name": "Clarke Quay Riverside",
"address": "Clarke Quay, 179019"
}
},
"version": 1,
"recipient": {
"recipientId": "7ee31a3f-9ed7-49f6-800f-a697e687553f"
}
}