Channels

LINE

The LINE channel integrates Open Astra agents into your LINE Official Account. Agents respond to direct messages and group mentions via the LINE Messaging API webhook. LINE is dominant in Japan, Thailand, and Taiwan and is a first-class bot platform.

Setup

  1. Go to the LINE Developers Console and create a new provider and channel (Messaging API)
  2. Under Messaging API, copy the Channel access token — this is your LINE_CHANNEL_ACCESS_TOKEN
  3. Under Basic settings, copy the Channel secret — this is your LINE_CHANNEL_SECRET
  4. Set the webhook URL to your Astra gateway: https://your-domain/channels/line
  5. Enable Use webhook in the LINE console
  6. Add to your environment:
bash
LINE_CHANNEL_ACCESS_TOKEN=your-channel-access-token
LINE_CHANNEL_SECRET=your-channel-secret

Configuration in astra.yml

yaml
channels:
  line:
    enabled: true
    channelAccessToken: your-token   # Overrides LINE_CHANNEL_ACCESS_TOKEN
    channelSecret: your-secret       # Overrides LINE_CHANNEL_SECRET

Features

  • Direct messages — agents respond to 1:1 messages automatically
  • Group & room mentions — agents respond when mentioned in group chats
  • Flex Messages — structured responses use LINE Flex Message format for rich layouts
  • Quick replies — agent suggestions can be surfaced as LINE quick reply buttons
  • Signature verification — all incoming webhooks are verified using the channel secret

Environment Variables

VariableRequiredDescription
LINE_CHANNEL_ACCESS_TOKENYesLong-lived channel access token from LINE Developers Console
LINE_CHANNEL_SECRETYesChannel secret used for webhook signature verification
LINE requires a publicly accessible HTTPS endpoint. In development, use a tunnel like ngrok: ngrok http 3000.