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
- Go to the LINE Developers Console and create a new provider and channel (Messaging API)
- Under Messaging API, copy the Channel access token — this is your
LINE_CHANNEL_ACCESS_TOKEN - Under Basic settings, copy the Channel secret — this is your
LINE_CHANNEL_SECRET - Set the webhook URL to your Astra gateway:
https://your-domain/channels/line - Enable Use webhook in the LINE console
- Add to your environment:
bash
LINE_CHANNEL_ACCESS_TOKEN=your-channel-access-token
LINE_CHANNEL_SECRET=your-channel-secretConfiguration in astra.yml
yaml
channels:
line:
enabled: true
channelAccessToken: your-token # Overrides LINE_CHANNEL_ACCESS_TOKEN
channelSecret: your-secret # Overrides LINE_CHANNEL_SECRETFeatures
- 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
| Variable | Required | Description |
|---|---|---|
LINE_CHANNEL_ACCESS_TOKEN | Yes | Long-lived channel access token from LINE Developers Console |
LINE_CHANNEL_SECRET | Yes | Channel secret used for webhook signature verification |
ℹLINE requires a publicly accessible HTTPS endpoint. In development, use a tunnel like ngrok:
ngrok http 3000.