Back to Eliza

LINE Connector

packages/docs/connectors/line.md

2.0.13.0 KB
Original Source

LINE Connector

Connect your agent to LINE for bot messaging and customer conversations using the @elizaos/plugin-line package.

Prerequisites

The LINE connector is an elizaOS plugin that bridges your agent to LINE Messaging API. It supports rich message types, group chat, and webhook-based event handling. This connector is available from the plugin registry.

Package Info

FieldValue
Package@elizaos/plugin-line
Config keyconnectors.line
Installeliza plugins install @elizaos/plugin-line

Setup

1. Create a LINE Messaging API Channel

  1. Go to LINE Developers Console
  2. Create a new provider (or use an existing one)
  3. Create a new Messaging API channel
  4. Under the Messaging API tab, issue a Channel access token
  5. Note the Channel secret from the Basic settings tab

2. Configure Eliza

NameRequiredDescription
LINE_CHANNEL_ACCESS_TOKENYesChannel access token from LINE Developer Console
LINE_CHANNEL_SECRETNoChannel secret for webhook verification
LINE_ENABLEDNoEnable or disable the connector
LINE_DM_POLICYNoDM policy (e.g., allow, deny, allowlist)
LINE_ALLOW_FROMNoComma-separated allowed user list
LINE_GROUP_POLICYNoGroup message policy (e.g., allow, deny)
LINE_WEBHOOK_PATHNoWebhook endpoint path

Install the plugin from the registry:

bash
eliza plugins install line

Configure in ~/.eliza/eliza.json:

json
{
  "connectors": {
    "line": {
      "channelAccessToken": "YOUR_CHANNEL_ACCESS_TOKEN",
      "channelSecret": "YOUR_CHANNEL_SECRET"
    }
  }
}

Or via environment variables:

bash
export LINE_CHANNEL_ACCESS_TOKEN=YOUR_CHANNEL_ACCESS_TOKEN
export LINE_CHANNEL_SECRET=YOUR_CHANNEL_SECRET

Environment Variables

VariableRequiredDescription
LINE_CHANNEL_ACCESS_TOKENYesChannel access token from LINE Developers Console
LINE_CHANNEL_SECRETYesChannel secret for webhook verification
LINE_ENABLEDNoSet to true to enable
LINE_DM_POLICYNoDM policy (e.g., allow, deny, allowlist)
LINE_ALLOW_FROMNoComma-separated allowed user list
LINE_GROUP_POLICYNoGroup message policy (e.g., allow, deny)
LINE_WEBHOOK_PATHNoWebhook endpoint path

Configuration Reference

FieldRequiredDescription
channelAccessTokenYesLINE Messaging API channel access token
channelSecretYesLINE channel secret
enabledNoSet false to disable (default: true)

Features

  • Bot messaging and customer conversations
  • Rich message types (text, sticker, image, video)
  • Group chat support
  • DM and group message policies
  • Webhook-based event handling