Skip to main content
Connect your Comis agent to LINE private and group chats. Supports file attachments up to 200 MB and Flex Message formatting. LINE uses webhooks for receiving messages, so your Comis instance must be accessible from the internet.
You don’t need to understand the technical details to use this feature. The configuration examples below are copy-paste ready.

Prerequisites

  • A LINE account
  • A LINE Developer Console account
  • A publicly accessible URL for webhooks (or a tunnel like ngrok for testing)
LINE uses webhooks to deliver messages to your bot. Your Comis gateway must be reachable from the internet at the webhook URL you configure. For local testing, use a tunnel service like ngrok. For production, deploy behind a reverse proxy with HTTPS.

Setup

1

Create a LINE Messaging API channel

Go to the LINE Developer Console and sign in with your LINE account.
  • Create a new Provider (or use an existing one)
  • Under the provider, create a new Messaging API channel
  • Give it a name and description — this is what users will see when they add your bot as a friend
  • Note the Channel ID on the channel overview page
2

Get your credentials

In the channel settings, go to the Messaging API tab:
  • Scroll to the bottom and click Issue next to Channel Access Token (long-lived). Copy this token — it is your bot’s API key.
Go to the Basic settings tab:
  • Copy the Channel Secret. This is used to verify that webhook requests actually come from LINE.
3

Configure the webhook URL

In the LINE Developer Console, go to Messaging API then Webhook settings:
  • Set the Webhook URL to https://your-domain:port/webhooks/line (replace your-domain:port with your actual gateway address)
  • Enable Use webhook
  • Disable Auto-reply messages and Greeting messages (Comis handles responses itself)
LINE verifies webhook requests with HMAC-SHA256 using your channel secret; Comis enforces this signature check on every incoming event.
4

Configure Comis

Add the LINE channel to your Comis configuration file (~/.comis/config.yaml):
channels:
  line:
    enabled: true
    botToken: "${LINE_CHANNEL_ACCESS_TOKEN}"
    channelSecret: "${LINE_CHANNEL_SECRET}"
    webhookPath: "/webhooks/line"
Set the environment variables in your ~/.comis/.env file:
LINE_CHANNEL_ACCESS_TOKEN=your-access-token-from-step-2
LINE_CHANNEL_SECRET=your-channel-secret-from-step-2
Never store API keys, tokens, or passwords directly in config.yaml. Use the .env file or Secret Manager for credential management.
5

Restart and verify

Restart the Comis daemon to pick up the new configuration:
comis daemon stop && comis daemon start
Check the logs for a successful startup:
comis daemon logs
Look for “LINE adapter started” or “channel-line activated”.Back in the LINE Developer Console, click Verify next to the webhook URL to confirm the connection works. Then add the bot as a friend in the LINE app and send it a message.

Configuration

These options go under channels.line in your config.yaml:
OptionTypeDefaultWhat it does
enabledbooleanfalseTurns on the LINE adapter
botTokenstring / SecretRef(required)Channel Access Token from the LINE Developer Console
channelSecretstring / SecretRef(required)Channel Secret for webhook signature verification
webhookPathstring"/webhooks/line"URL path where LINE sends webhook events
allowFromstring[][] (all)Restrict to specific LINE user IDs. Empty means all users can talk to the bot.
mediaProcessing.transcribeAudiobooleantrueTranscribe voice messages to text before passing to the agent
mediaProcessing.analyzeImagesbooleantrueDescribe images sent to the bot using AI vision
mediaProcessing.describeVideosbooleantrueExtract descriptions from video content
mediaProcessing.extractDocumentsbooleantrueExtract text from PDFs, DOCX, and other documents
mediaProcessing.understandLinksbooleantrueFetch and summarize URLs included in messages

What your agent can do

Once connected to LINE, your agent can:
  • Send and receive messages in private chats and groups
  • Send and receive image, video, and audio messages (up to 200 MB)
  • Send native voice messages (audio uploaded as LINE audio messages)
  • Receive location messages (lat/lon coordinates flow into the agent’s metadata)
  • Send Flex Messages for rich formatted content via the sendFlex platform action — you can pass a raw FlexContainer JSON or a high-level FlexTemplate (header, body, footer, hero image) that the adapter renders for you
LINE does not support reactions, editing or deleting sent messages, fetching message history, threads, typing indicators, native polls, traditional buttons (use Flex postback actions instead), or @mentions.
LINE issues a 30-second reply token for every inbound event. Comis ignores it and uses pushMessage instead so responses still deliver after long agent turns; this consumes from your monthly push-message quota.

Platform limits

LimitValueWhat Comis does about it
Message length5,000 charactersAutomatically splits long responses into multiple messages at paragraph boundaries
Attachment size200 MBGenerous limit that is rarely hit in practice

Troubleshooting

What happened: The webhook URL is not configured correctly or is not reachable from LINE’s servers.How to fix it: In the LINE Developer Console, go to Messaging API and check the Webhook settings. Verify the URL points to your Comis gateway (including the correct port) and click Verify to test the connection. Make sure your server is accessible from the internet and not blocked by a firewall.
What happened: The Channel Secret in your Comis config does not match the one in the LINE Developer Console.How to fix it: Go to the LINE Developer Console, open the Basic settings tab, and copy the Channel Secret. Update the LINE_CHANNEL_SECRET value in your ~/.comis/.env file and restart the daemon.
What happened: Comis is not running, the gateway is not accessible, or the webhook path does not match.How to fix it: Make sure Comis is running (comis daemon status). Check that the webhookPath in your config matches the path in the LINE Developer Console (default is /webhooks/line). If you are running locally, make sure your tunnel (e.g., ngrok) is active and pointing to the correct port.

Delivery Infrastructure

How streaming, typing indicators, and retry logic work under the hood.

Multiple users & teams

Run one install for a whole team - private per person, isolated per agent.

All Channels

Compare all 9 supported platforms side by side.

Agent Configuration

Set up your agent’s personality, tools, and behavior.

Secret Management

Learn how to manage API keys and tokens securely.