Early access

LINE: your Official Account

DMWire connects a LINE Official Account you own through LINE's Messaging API. Your agent answers the people who added the account as a friend.

Connect an Official Account

  1. In the LINE Developers console, open your Official Account's Messaging API channel. Copy the channel secret (Basic settings) and issue a long lived channel access token (Messaging API tab).
  2. Ask your agent to "connect my LINE account" with both, or call connect_line:
bash
curl -X POST https://api.dmwire.ai/v1/channels/line \
  -H "X-API-Key: $DMWIRE_API_KEY" -H "Content-Type: application/json" \
  -d '{"channel_access_token":"...","channel_secret":"..."}'
  1. The answer carries webhook_url. Paste it as the Webhook URL in the Messaging API tab and turn Use webhook on.
  2. Run verify_line_webhook once that is saved. It checks the token again and refreshes the account's response mode.

When chat_mode_ok is false, the account is in chat mode and LINE neither delivers its messages to DMWire nor sends replies. Switch the response mode to Bot in the LINE Official Account Manager, then verify again.

The answer also carries bot_user_id, the id get_line_status and disconnect_line take. The token and secret are never returned. If you issue a new token in the console, connect again with it.

Sending

  • LINE only lets an account message people who added it as a friend. Your agent can answer and message those people, addressed by to.line_user_id (from their inbound message) or to.contact_id.
  • Someone who never wrote to the account is refused with needs_inbound_first (409). Someone who blocked or unfollowed the account is refused with not_a_follower (409) until they write again.
  • Your LINE Official Account plan decides how many messages the account can send each month.

Limits on LINE

LimitValue
Messages you send per day (early access)50
Messages to one person who has not replied3, then DMWire waits for their reply

Last checked against the live service on 2026-10-17.