LINE messaging
Hermoso reads and answers the messages people send your LINE Official Account. They arrive in the same inbox as your WhatsApp, Instagram and Messenger conversations, in the app and through list_inbox. You can also send a message to one person and broadcast to your friends. LINE is a messaging channel only: it does not let an app publish posts, so Hermoso never offers to post there.
LINE
Connect
You connect one LINE Official Account per brand, with two values from the LINE Developers console.
| Value | Where it is |
|---|---|
| Channel access token (long-lived) | Your channel, the Messaging API tab. Press Issue if there is none yet. |
| Channel secret | Your channel, the Basic settings tab. |
- In the app: Connectors, then the LINE card.
- From an agent or the API:
connect_connectorwith{"provider": "line", "fields": {"channelAccessToken": "...", "channelSecret": "..."}}.
Hermoso checks the token with LINE, points the channel's webhook at an address made for this connection (https://app.hermoso.ai/line/webhook/ followed by 32 random characters), and has LINE send a test message to it. The test also proves the channel secret: a secret from a different channel is refused and nothing is saved. Every message LINE delivers afterwards is checked against that secret before Hermoso reads it.
Two things are left to you, because LINE has no way for an app to do them:
- On the Messaging API tab, turn on Use webhook.
- In LINE Official Account Manager, under Settings, Response settings, turn Webhooks on, and turn auto-reply and greeting messages off unless you want LINE to answer as well.
One address per channel. LINE holds a single webhook address for a channel. If another tool's address is already there, Hermoso leaves it alone and tells you; add "replaceWebhook": true (or tick the box in the app) to move the channel to Hermoso.
Read and answer
read_line_inbox lists every conversation, and one conversation in full when you pass its id. list_inbox shows the same conversations beside your other channels. Text, photos, videos, voice messages, files, stickers and locations all arrive; a photo or file comes with a link.
- Seven days. LINE cannot hand a message back after delivering it, so Hermoso keeps what arrives for 7 days so you can read and answer it, then deletes it along with any photo or file.
- A reply inside a minute is free. LINE gives each incoming message a reply pass that lasts about a minute. After that an answer goes as a push message, which uses one message of your LINE quota. The answer tells you which of the two it was.
- One person at a time. Group chats are not included.
- Someone who blocked the account is not messaged. LINE accepts a message to them and delivers nothing, so Hermoso refuses it and says why.
Send and broadcast
| You send | LINE's limit |
|---|---|
| Text | 5,000 characters |
| A picture | JPEG or PNG, up to 10 MB |
| A video | MP4, up to 200 MB |
Anything over a limit is refused with the limit. Nothing is cut or converted.
send_line_message sends to one person. send_line_broadcast sends one message to many, in the three ways LINE defines:
- broadcast: every friend of the account.
- multicast: a list of LINE user ids, up to 5,000 in a call.
- narrowcast: the friends who match a LINE audience or demographic filter. LINE needs the account to reach at least 100 friends and at least 50 people to match.
A broadcast cannot be recalled, and every person it reaches uses one message of your LINE quota. So it runs in two steps. First ask with "dryRun": true: nothing is sent, and you get the number of people it reaches, read from LINE, and what is left of your quota. Then send with "confirm": true and "confirmCount" set to that exact number. A different number is refused.
line_quota reads your monthly message limit and how much is used. line_account reads your friend count and whether LINE is sending messages to Hermoso. line_profile reads one person's name and picture.
Who pays for LINE messages. LINE counts push, multicast, broadcast and narrowcast messages against your account's monthly quota and bills it on your own LINE plan. Hermoso charges nothing for LINE.
The tools
| Tool | What it does |
|---|---|
read_line_inbox | Read LINE conversations, and reply to one |
send_line_message | Send text, a picture or a video to one person |
send_line_broadcast | Broadcast, multicast or narrowcast, after a dry run and a confirmed count |
line_quota | The monthly LINE message limit and what is used |
line_account | Friend count, and whether LINE is sending messages to Hermoso |
line_profile | One person's name, picture and language |
list_inbox, reply_to_inbox_item | LINE in the one inbox, with every other channel |
All of them are free. Sending is confirm-gated on every surface: an agent shows you the exact message first.