Connecting Hermes Agent to LINE takes four things: a LINE Official Account, the Messaging API switched on from that account's settings, a Channel secret plus a long-lived Channel access token from the LINE Developers Console, and an HTTPS webhook URL that LINE can post messages to. Put the two credentials into Hermes, paste the webhook URL back into LINE, turn off the account's built-in auto-replies, then add your own LINE user ID to Hermes's allowlist and send it a message. The step people miss is the last one: by default Hermes ignores anyone who isn't on the allowlist, which is why so many setups "do nothing" on the first try.
If you run Hermes on RoamerHost's managed Hermes Agent hosting, the webhook side is already wired up. Your URL is always https://your-subdomain/line/webhook, with no tunnel or reverse proxy to build, and on the Advanced plan you can simply ask Roamer AI to enter the credentials and the allowlist for you. This guide follows the real order of operations and points out where the managed and self-hosted setups differ.
LINE steps are based on the LINE Developers documentation and Hermes settings on the official Hermes Agent docs, both checked on November 23, 2026. Both interfaces change often, so trust the labels you actually see.
Three things to know before you start
First, you connect a LINE Official Account, not your personal LINE account. Hermes talks to LINE through the Messaging API, which is only available to official accounts. You end up with a separate bot account that you and anyone else you invite add as a friend. Official accounts are free to open with a LINE account or an email address.
Second, you can no longer create a Messaging API channel directly in the LINE Developers Console. According to LINE's documentation, since September 2024 you create the official account first, then enable the Messaging API from LINE Official Account Manager, and the channel is created for you. Older tutorials that say "click Create a new channel in the console" will send you looking for a button that no longer exists.
Third, replies don't count against your message quota, but pushes do. Under LINE's rules, reply messages are not counted toward the monthly limit of your official account plan, while push, multicast and broadcast messages are. Hermes's LINE adapter always tries the free reply token first and only falls back to a push when that token has expired. When you ask and it answers, that's a reply. When a scheduled job fires and Hermes messages you on its own, that's a push and it uses your monthly allowance, which matters if you want a report every morning.
If you're the only user and don't care which app you use, Telegram needs nothing more than a bot token. People choose LINE because it's where their family and coworkers already are. If you're still figuring out what Hermes does, start with our plain-language Hermes Agent intro.
Step 1: create the official account and enable the Messaging API
Sign in to LINE Official Account Manager with your LINE account and fill in the short form (account name, business type). The name is what shows up in your chat list, so pick something you'll recognize, like "My Hermes assistant".
Then open Settings in the account, choose Messaging API on the left and click Enable Messaging API. The first time, you'll create a developer account with your name and email and pick a provider. Think of a provider as a folder for your channels; create a new one named after you or your company. One warning from LINE's docs: once an official account is assigned to a provider, it can't be changed or unassigned, and the same person gets a different user ID under each provider, so don't mix unrelated services or companies in one provider.
Now sign in to the LINE Developers Console with the same LINE account, open the provider, and you'll see a Messaging API channel with the same name as your official account.
Step 2: get the Channel secret and Channel access token
Hermes needs two values. In the channel's Basic settings tab, scroll down to Channel secret and copy it. Hermes uses it to check the signature on every webhook request and rejects anything that doesn't match.
Switch to the Messaging API tab, scroll to Channel access token (long-lived), click Issue and copy the token. This is what Hermes uses to send messages back. LINE also offers tokens with a custom expiry, but the Hermes docs call for the long-lived one. You can reissue it at any time; reissuing invalidates the old token, so update Hermes if you ever do. Treat both values like keys to the account and never post them in a chat or a public repository.
| Value | Where to get it | Where it goes |
|---|---|---|
| Channel secret | LINE Developers: the channel's Basic settings tab | LINE_CHANNEL_SECRET in Hermes (Channels page of the dashboard on managed hosting) |
| Channel access token (long-lived) | LINE Developers: bottom of the Messaging API tab, click Issue | LINE_CHANNEL_ACCESS_TOKEN in Hermes (Channels page on managed hosting) |
| Webhook URL | Managed: https://your-subdomain/line/webhook; self-hosted: your own public HTTPS address | LINE Developers: Webhook URL on the Messaging API tab |
| Your user ID (starts with U) | Hermes's log after your first message | LINE_ALLOWED_USERS in Hermes |
Step 3: put the credentials into Hermes
On managed hosting, sign in to the Hermes web dashboard (the login is on your project page in the member area), open Channels, find LINE, paste in the Channel access token and Channel secret, and save. Give Hermes a moment to reload before moving on.
On the Advanced plan you can hand the whole thing to Roamer AI instead. Click "Set up with Roamer AI" on the Hermes project page and say "connect LINE for me". It walks you through where to find each value, writes them into the configuration once you paste them, and restarts Hermes. It takes a snapshot before writing, and if Hermes fails to come back up it rolls the change back automatically. It can handle the allowlist later too.
Self-hosted, both values go into the .env file in your Hermes folder as LINE_CHANNEL_ACCESS_TOKEN and LINE_CHANNEL_SECRET, and you enable the LINE platform in config.yaml; details are in the self-hosting section below.
One ordering detail: on managed hosting the LINE webhook only starts listening after both credentials are saved. Before that, LINE's Verify button will always fail, so do this step first.
Step 4: set the webhook URL and turn off auto-replies
Back on the Messaging API tab, click Edit next to Webhook URL and enter your address. On managed hosting it's https://your-subdomain/line/webhook, where the subdomain is the address you use for the Hermes dashboard. Click Update, then Verify; Success means LINE can reach Hermes. Finally switch on Use webhook, or LINE won't forward anything.
LINE has two hard rules for this URL: it must be HTTPS, and self-signed certificates aren't accepted. The managed subdomain already has a proper certificate; self-hosters usually get stuck right here.
Then switch off the account's built-in responses. The same tab lists Auto-reply messages and Greeting messages; Edit takes you to the response settings in Official Account Manager. LINE recommends disabling both for a first bot so every reply goes through the Messaging API. Auto-replies have to go, or users get a canned message and a Hermes answer at the same time. The greeting message doesn't compete with Hermes, so keep it if you like it.
Step 5: add yourself to the allowlist and say hello
Add the official account as a friend by scanning its QR code (it's on the account's home screen) and send "hi". If nothing happens, don't start over. The allowlist is the usual culprit.
Hermes's LINE adapter has three allowlists: user IDs for one-on-one chats (starting with U), group IDs (C) and room IDs (R), stored in LINE_ALLOWED_USERS, LINE_ALLOWED_GROUPS and LINE_ALLOWED_ROOMS. Messages from sources that aren't listed are silently dropped. The docs treat the allowlist as required; LINE_ALLOW_ALL_USERS exists but is marked for development only. Anyone can add an official account as a friend, so allowing everyone means strangers could spend your AI usage and read whatever Hermes remembers. Don't turn it on for real use.
Your user ID isn't the LINE ID you chose; it's a long string starting with U. The easiest way to find it is the message that just went unanswered: Hermes logs a line containing rejecting unauthorized source with your ID in it. Put it in LINE_ALLOWED_USERS (separate several people with commas), let Hermes reload and try again. On the Advanced plan, just tell Roamer AI "I messaged it and got no reply, add me to the allowlist" and it will pull the ID from the log and set it.
In your first conversation, tell Hermes how you want it to behave on LINE: reply in your language, keep answers short, and skip Markdown, since LINE shows asterisks and pound signs literally. Hermes keeps this in long-term memory.
Groups and scheduled messages
To put Hermes in a family or team group, both sides need a switch. In LINE Developers, turn on Allow bot to join group chats on the Messaging API tab; it's off by default, and only one official account can be in a group at a time. In Hermes, add the group ID (starting with C) to LINE_ALLOWED_GROUPS, found the same way: invite the bot, say something in the group, then look for the rejected source in the log. On managed hosting, just add the group ID to LINE_ALLOWED_GROUPS under Channels in the dashboard; on Advanced, Roamer AI can set it up for you.
Think before you do it: everyone in the group can give it tasks, and it sees the conversation directed at it. Get comfortable in a one-on-one chat first, then add it to a small group of people who trust each other. The typing indicator also only appears in one-on-one chats.
For scheduled results, tell Hermes something like "summarize yesterday's orders and send them to me at 8 every morning". To deliver to LINE it needs a default destination, LINE_HOME_CHANNEL, set to your user ID or a group ID. Those messages are pushes: one a day is about thirty a month, and a push to a group counts once per member, so check your official account plan.
Hermes also saves you pushes on slow answers. If a reply takes longer than the default 45 seconds, it first sends a bubble with a Get answer button; tapping it gives Hermes a fresh reply token to deliver the answer as a free reply. The button isn't an error.
What self-hosting adds
Steps 1, 2 and 5 are identical if you run Hermes yourself. The official docs have the LINE adapter listen on port 8646, which you expose as a public HTTPS address with Cloudflare Tunnel, ngrok or devtunnel; a named Cloudflare tunnel with a fixed hostname is recommended for production, otherwise you re-enter the URL in LINE every time it changes. Put the credentials and allowlist in .env, set gateway.platforms.line.enabled to true in config.yaml, and start it with hermes gateway. To send images, audio or video you also need LINE_PUBLIC_URL, because LINE only accepts media as public HTTPS links.
The ongoing work is the real cost: if the webhook goes down, messages are lost, so the machine and tunnel have to stay up, and Hermes releases often enough that every upgrade means re-checking the LINE adapter. We compared what you take on yourself versus with a host in our Hermes Agent hosting comparison. If what you actually want is a LINE bot you code yourself, see how to deploy a LINE bot.
Troubleshooting order
Start with Verify in LINE. If it fails on managed hosting, the credentials usually aren't saved yet or Hermes is still reloading; self-hosted, the tunnel is down, the URL is wrong or the certificate isn't trusted. If Verify works but nothing replies, check that Use webhook is on and auto-replies are off. Then read the Hermes log: rejecting unauthorized source means the allowlist, invalid signature means a mistyped Channel secret, and already in use by another profile means another running Hermes holds the same token. Managed customers can press Restart on the project page, which keeps memory, skills and settings; if that doesn't help, send us the project URL.
Which option fits
If you want Hermes Agent inside the LINE app you open every day, handling research, drafting posts and scheduled reports, without running a tunnel, babysitting a server or tracking releases, choose RoamerHost's managed Hermes Agent hosting: the webhook is ready, so you only need the credentials, the URL and the allowlist from this guide. If you already have a model API key, Pro is NT$7,188 a year (about NT$599 a month). If you'd rather not deal with API keys and want Roamer AI to handle setup like this for you, Advanced is NT$19,188 a year (about NT$1,599 a month) with the Roamer AI model built in. Both include 10GB of storage; see Hermes Agent hosting plans. Every new purchase can be refunded in full within 30 days.
If you want a secretary-style assistant that watches your calendar and inbox over Telegram or Discord, read OpenClaw vs Hermes Agent.
FAQ
Q: Can Hermes Agent use my personal LINE account?
No. Hermes uses the LINE Messaging API, which only works with LINE Official Accounts. Open a free official account and have the people it should serve add it as a friend.
Q: Does connecting LINE cost money?
On LINE's side, official accounts are free to open and Hermes's replies don't count toward your monthly messages; only scheduled pushes do. On the Hermes side you pay for a server and model usage if you self-host, or an annual plan on RoamerHost, where Pro uses your own API key and Advanced includes the Roamer AI model.
Q: Verify keeps failing. What now?
Check that the URL is HTTPS and ends in /line/webhook. On managed hosting, save the Channel access token and Channel secret in the dashboard first; the webhook isn't listening until you do. Wait for Hermes to reload, then try again.
Q: Everything looks right but it never replies.
The usual cause is the allowlist. Find the rejecting unauthorized source line in the log and add the U-prefixed user ID to LINE_ALLOWED_USERS, or ask Roamer AI to do it on the Advanced plan. Also confirm auto-replies are off and Use webhook is on.
Q: Can several people share one Hermes?
Yes. Add each person's user ID, or set up a group allowlist. Memory is shared, though, so anything Hermes remembers can come up for anyone on the list. It suits a household or small team, not a public customer service bot.
Sources
- LINE Developers: Get started with the Messaging API
- LINE Developers: Build a bot
- LINE Developers: Channel access token, Group chats, Messaging API pricing
- Hermes Agent docs: LINE Setup
- RoamerHost: Managed Hermes Agent hosting