Skip to main content

LINE Setup

Overview

The LINE channel connects Anyy to LINE Messaging API webhooks. It supports direct messages, groups, webhook receiving, and live-smoke checks.

Prerequisites

  • A LINE Messaging API channel.
  • Channel access token.
  • Channel secret.
  • Public HTTPS webhook endpoint for the Anyy gateway.
  • Optional bot user id for self-message filtering.

Setup

Create credentials

Create or reuse a LINE Messaging API channel and configure its webhook to point to Anyy's LINE webhook path:

/channels/line/webhook

Configure Anyy

anyy setup channels line \
--secret channel_access_token='line-access-token' \
--secret channel_secret='line-channel-secret' \
--write-config

Optional:

channels:
line:
bot_user_id: "line-bot-user-id"

Setup defaults:

FieldDefault
account_idline
webhook_path/channels/line/webhook
mention_aliases["anyy"]
dm_policyopen
group_policymention
send_chunk_chars4000

Start Gateway

anyy gateway start
anyy channels reload

Run doctor checks

anyy channels doctor line

Access Policy

Direct messages

LINE defaults to dm_policy: open. Use allowlist and LINE user ids in allow_from for a private assistant.

Groups

LINE defaults to group_policy: mention. Group messages need a mention alias unless you configure a broader policy.

Admins

LINE channel policy and shared command authorization are separate.

Sessions

Each accepted LINE user or group maps to an Anyy session.

Media Support

Inbound media

LINE does not advertise inbound media support in the current adapter.

Outbound media

LINE sends text replies only in the current adapter.

Commands

Use shared messaging commands. In groups, include a configured mention alias when group_policy is mention.

Cron Delivery

anyy cron create \
--name "LINE reminder" \
--schedule "30m" \
--prompt "Send a reminder" \
--delivery-target current_user_default \
--delivery-channel line

Troubleshooting

  • Webhook verification fails: check channel_secret_ref and the public webhook URL.
  • Replies fail: check channel_access_token_ref.
  • Group messages ignored: mention anyy or adjust group_policy.
  • Unexpected users can message the bot: use dm_policy: allowlist.