Connecting a LINE Official Account
The Official Account comes first
There is no "create a Messaging API channel" button in the LINE Developers Console. LINE removed it on September 4, 2024. A channel is now something an Official Account grows, not something you make on its own.
Sign up for a LINE Business ID at account.line.biz/signup and create the Official Account through the entry form. Then open the LINE Official Account Manager at manager.line.biz, select the account, click Settings at the top right, and choose Messaging API from the side menu.
Enabling it there asks you to assign a provider — LINE's word for the company that owns the channel. Choose deliberately. A provider cannot be changed or de-assigned afterwards.
The channel is created at that moment. It appears in the LINE Developers Console at developers.line.biz/console under that provider, as long as you log in with the same account you used for the Official Account Manager.
The two consoles stay split from here. Anything a person sees — account name, icon, greeting, auto-replies — is edited in the Official Account Manager. Anything a program needs — credentials, the webhook — lives in the Developers Console. Basic settings makes the split visible: it shows the name and icon but links out to the Official Account Manager to change them.
The two values to copy
Both are on the channel's Basic settings tab.
Channel ID is at the top under Basic information — a ten-digit number with a copy button beside it.
Channel secret is far down the same page, below App types and Permissions. It is masked, with a copy button and an Issue button next to it.
Leave Issue alone on a connected channel. It mints a replacement and voids the current secret, and because that secret is what identifies your incoming webhooks, every event starts getting rejected until the stored credentials catch up.
Those two values are all Daslab needs. Don't issue a channel access token: a short-lived stateless token is minted from the ID and secret on demand and cached for the fourteen minutes it stays valid. A pre-issued long-lived token still works if you inherited one, but it is no longer the path.
Connect in Daslab before verifying the webhook
LINE sends no channel identifier with a webhook. There is nothing on the request that says which account it belongs to. Resolution instead happens by recomputing the HMAC-SHA256 over the raw body against each connected account's channel secret and taking the one that matches — so an account has to exist in Daslab before any event can be attributed to it, including LINE's own verification ping.
Connect LINE Account, paste the Channel ID and Channel secret. The account is world-scoped, so every scene in the workspace can reach it.
Connecting sets the webhook URL for you — https://daslab.run/webhooks/line/bot — using the same credentials you just pasted. You don't need to copy it into the console.
One exception: if the channel's webhook already points somewhere else, it is left exactly where it is. A LINE channel has only one webhook URL, and taking it from a working integration isn't a decision worth making on your behalf. The account then reads Points elsewhere, showing the URL it found.
A channel that already has an integration
That existing integration doesn't have to lose anything. Paste its webhook URL into Forward events to — on the connect form, or by editing the account after seeing where the webhook points. That's the consent: Daslab takes the channel's webhook and passes every event on to the old URL, byte-identical, original signature header included. The other system's signature check still passes; its code never learns anything changed. The account then reads Receiving, forwarding to 1 target, and the card shows whether the last handoff succeeded.
The URL that was displaced is remembered. Disconnect the account and the webhook is set back to it, exactly as found.
If the existing integration has to stay in front — some vendors won't share, some compliance teams won't allow a proxy — turn it around: choose **I keep my webhook and forward a copy to Daslab** on the form. The channel's webhook stays untouched, and whoever holds it forwards each event (raw body and X-Line-Signature header unchanged) to the ingest URL the account shows. Events arriving that way are verified with the same signature check, so the forwarder isn't trusted — the bytes are. Duplicates during a cutover are dropped by event id.
Two switches that have no API
Setting the URL is the half that can be automated. These two can't be, and without them nothing arrives:
Use webhook, in the Developers Console under Messaging API. LINE reports whether it's on but offers no way to turn it on. Until you flip it, the account reads Enable "Use webhook".
Auto-reply messages, in the Official Account Manager under Settings → Response settings. A new Official Account ships with canned replies switched on, and they answer first. This is the most common reason a correctly wired bot replies with something nobody wrote.
With both done, the account reads Receiving.
History starts when the webhook does
LINE has no API for listing the chats a bot belongs to, and none for reading a chat's past messages. The webhook is the only source. Every event it delivers is stored, and a conversation is those events grouped by who they came from — so a chat exists, readable and repliable, from the moment it first speaks. Nothing has to be created for it.
Chats collect on the account, which reports how many are open and how many are unread. Putting one on a board is a separate step: add it like any other asset, and the pinned card reads the same log rather than a copy of it.
So a freshly connected account starts empty, even a busy one. Nothing backfills. Conversations appear as people write into them.
To produce the first one: open the Messaging API tab, scan the QR code with the LINE app to add the account as a friend, and send it a message.
Attachments outlive LINE's copy
Photos are how people actually talk on LINE, and LINE hands them over as a message id rather than as bytes. The content sits behind an authenticated endpoint and is deleted after a retention window, so the id in the event is no use to a browser and eventually no use to anyone.
Every attachment is therefore copied out the moment its message arrives, and addressed by a Daslab URL from then on — an image, video, audio clip, or file stays viewable long after LINE has dropped it. Nothing is fetched on demand: whatever nobody happened to open in time would already be gone.
Quota
Push, multicast, and broadcast messages draw on a monthly allowance set by the account's plan and country. The account widget reads the live figure and shows what remains; amber means less than a fifth of the month's allowance is left.
Answering a conversation counts against that allowance too. LINE exempts only replies sent with the token attached to an incoming event, and that token expires about a minute after the message arrives.
Plans differ by country, so check the account's own figure rather than assuming a number.