You don’t need to understand the technical details to use this feature. The configuration examples below are copy-paste ready.
Prerequisites
- Comis installed and running (Quickstart)
- A LINE account
- A LINE Developer Console account
- A publicly accessible URL for webhooks (or a tunnel like ngrok for testing)
Setup
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
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.
- Copy the Channel Secret. This is used to verify that webhook requests actually come from LINE.
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(replaceyour-domain:portwith your actual gateway address) - Enable Use webhook
- Disable Auto-reply messages and Greeting messages (Comis handles responses itself)
Configure Comis
Add the LINE channel to your Comis configuration file
(Set the environment variables in your
~/.comis/config.yaml):~/.comis/.env file:Restart and verify
Restart the Comis daemon to pick up the new configuration:Check the logs for a successful startup: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 underchannels.line in your config.yaml:
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | Turns on the LINE adapter |
botToken | string / SecretRef | (required) | Channel Access Token from the LINE Developer Console |
channelSecret | string / SecretRef | (required) | Channel Secret for webhook signature verification |
webhookPath | string | "/webhooks/line" | URL path where LINE sends webhook events |
allowFrom | string[] | [] (all) | Restrict to specific LINE user IDs. Empty means all users can talk to the bot. |
mediaProcessing.transcribeAudio | boolean | true | Transcribe voice messages to text before passing to the agent |
mediaProcessing.analyzeImages | boolean | true | Describe images sent to the bot using AI vision |
mediaProcessing.describeVideos | boolean | true | Extract descriptions from video content |
mediaProcessing.extractDocuments | boolean | true | Extract text from PDFs, DOCX, and other documents |
mediaProcessing.understandLinks | boolean | true | Fetch 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
sendFlexplatform action — you can pass a rawFlexContainerJSON or a high-levelFlexTemplate(header, body, footer, hero image) that the adapter renders for you
@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
| Limit | Value | What Comis does about it |
|---|---|---|
| Message length | 5,000 characters | Automatically splits long responses into multiple messages at paragraph boundaries |
| Attachment size | 200 MB | Generous limit that is rarely hit in practice |
Troubleshooting
Bot can send messages but never receives any
Bot can send messages but never receives any
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.
Invalid signature error in logs
Invalid signature error in logs
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.Webhook URL verification fails
Webhook URL verification fails
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.
