Skip to main content
Back to messaging or digital channels Connect a LINE Official Account to your agent so people reach it in LINE for chat and media messaging. You create the Official Account, enable the Messaging API on it, collect two credentials and one identifier, then register a webhook and verify it before any real traffic arrives. The setup requires:
  1. LINE setup: Create the Official Account, enable the Messaging API, and collect the Channel Secret, Channel Access Token, and Destination ID.
  2. Artemis channel configuration using those three values, then copy the generated webhook URL.
  3. Webhook configuration in LINE: Register the webhook URL, verify it, and switch delivery on.
After the configuration is complete, LINE posts every event for the channel to Artemis, which resolves the connection from the payload and hands the message to the deployed agent. Important considerations
  • Two consoles, two halves of the job: LINE splits the work between LINE Official Account Manager and the LINE Developers Console. Sign in to both with the same account, because the Developers Console asks first-time users to register a developer profile with a name and email, and an account that skips that step can’t see the channel it just created.
  • Official Account Manager creates the channel, not the Developers Console: LINE removed the ability to create Messaging API channels directly in the Developers Console in September 2024. Enabling the Messaging API on the Official Account creates the channel.
  • Provider selection is permanent: You can’t change or remove the provider afterwards, and a person receives a different user ID under each provider, so moving an account later would break every stored user reference.
  • The Destination ID is not shown in either console: It comes from an API call. Three identifiers that are shown look plausible and none of them route. See How Artemis routes LINE events.

Prerequisites

  • A LINE Business ID, registered with an existing personal LINE account or with an email address. See LINE setup.
  • The admin role on the Official Account and on the Messaging API channel. Several steps hide their controls from lower roles rather than reporting a permission error.
  • The admin role on the provider you intend to use, if you plan to select an existing one. A provider only appears in the selection list when your account holds that role on it.
  • Artemis project access with permission to open Deployments -> Channels, and a deployed agent in the environment you intend to bind.

How Artemis routes LINE events

LINE sends every event for a channel to one URL, so Artemis identifies the connection from the payload rather than the path. Each webhook body carries a destination field holding the bot’s user ID, and Artemis resolves the connection from that value before it verifies the signature. Three LINE identifiers look plausible in the Destination ID field and none of them route. The Channel ID on the Basic settings tab is numeric. The Bot basic ID on the Messaging API tab starts with @. Your user ID, also on the Basic settings tab, is your own personal LINE account, not the bot’s. The correct value comes from an API call, covered in LINE setup.

LINE setup

Complete all of this in LINE before you open Artemis. Start at the beginning even if someone has already created an Official Account, because enabling the Messaging API is what creates the channel you’ll configure.
1

Register a LINE Business ID

LINE accounts for business sit behind a Business ID, which you can register with an existing personal LINE account or with an email address.
  1. Go to account.line.biz and register a Business ID, if your organization doesn’t already have one.
  2. Use an account your team can keep. This identity carries the admin role for everything that follows.
2

Create the Official Account

  1. Complete LINE’s Official Account entry form with your business details. Submitting it creates the account.
  2. Open LINE Official Account Manager and confirm the new account appears in your list before you continue.
3

Enable the Messaging API

  1. In Official Account Manager, select the account.
  2. Go to Settings -> Messaging API and enable the Messaging API. This is what creates the channel that Artemis connects to.
You can’t do this anywhere else. LINE removed the ability to create Messaging API channels directly in the Developers Console in September 2024, so an attempt to start from the developer side has nothing to create.
4

Choose the provider carefully

LINE asks you to pick a provider, which is the organization that owns the channel. Two constraints make this a decision rather than a formality.You can’t change or remove the provider afterwards. And a person receives a different user ID under each provider, so moving an account later would break every stored user reference. An existing provider only appears in the list when your account holds the admin role on it, so a provider that seems to be missing is usually a permissions problem rather than an absent one.Pick the provider that owns your related channels, and avoid putting unrelated services under one provider for convenience.
5

Turn off LINE's automatic replies

A new channel arrives with greeting messages and auto-reply messages enabled, which means a person gets one LINE-managed response and one agent response to the same message.Reach the settings from either console:
  1. In Official Account Manager, open Settings -> Response settings.
  2. Or in the Developers Console, open the channel’s Messaging API tab, where Greeting messages and Auto-reply messages each carry an Edit link that opens Official Account Manager at the right place.
LINE recommends disabling both for a first Messaging API bot, and explains why under settings on LINE Official Account Manager. Disable both when the agent should own every reply. Keeping a greeting message is reasonable if you author it deliberately, but leaving the defaults on reads to users as a broken bot rather than as a settings problem.
6

Copy the Channel Secret from Basic settings

All three credential values live in the Developers Console, spread across two tabs of the same channel.
  1. Sign in at developers.line.biz/console.
  2. Select your provider, then select the Messaging API channel.
  3. Open the Basic settings tab and copy Channel secret. You need the admin role on the channel to see it.
Take care not to grab the Channel ID or Your user ID from the same screen. Both sit nearby, both look like credentials, and neither works.
7

Issue a Channel Access Token from the Messaging API tab

Open the Messaging API tab. LINE offers four token types, and this screen issues only one of them.The long-lived token is the one with an Issue control on this tab. The other three come from API calls rather than the console, so choosing them means building issuance into your own tooling.LINE recommends the v2.1 token, and that recommendation costs you a rotation schedule. Pick the long-lived token if you’d rather not build that, and accept that a single indefinite credential carries more risk. Whichever you choose, copy the value straight into your secret manager.
Reissuing a long-lived token normally kills the previous one immediately. LINE lets you extend the outgoing token’s validity by up to 24 hours when you reissue, which gives you a window to update Artemis without dropping messages. Use it.
8

Get the Destination ID from Get bot info

The console never shows this value, so you call for it.
  1. Use LINE’s Get bot info endpoint with the channel access token you just issued.
  2. Copy the userId from the response.
The value begins with U and matches the destination field LINE puts in every webhook for this channel. Run this from a secure terminal rather than a shared one, since the command carries your token.
9

Note the QR code for later

While you’re on the Messaging API tab, find the QR code or add-friend link. You’ll need it to test, and it’s easier to grab now than to come back for.

Artemis channel configuration

Create the connection before you verify the webhook in LINE. LINE’s verification request has to resolve to an active connection and authenticate with that connection’s Channel Secret, so an unsaved connection fails verification.
  1. Open Artemis and select the project.
  2. Go to Deployments -> Channels -> LINE -> + New. The New LINE Connection dialog opens.
  3. Configure the following fields:
  4. Select Create.
  5. Open the connection and copy the Webhook URL from the Overview tab. You need it for the next section.

Webhook configuration in LINE

LINE separates saving the URL from switching delivery on, so a verified webhook can still deliver nothing. Complete all three parts, in the Developers Console on the channel’s Messaging API tab.
1

Paste the webhook URL

  1. Find Webhook settings.
  2. Select Edit under Webhook URL.
  3. Paste the Artemis endpoint exactly as shown and select Update.
LINE accepts one endpoint per channel. Don’t append the Destination ID, the Channel ID, a project ID, or any connection identifier, because Artemis routes from the signed body rather than the path.LINE also requires HTTPS with a certificate from a widely trusted authority. Self-signed certificates fail, and so does a server missing its intermediate certificates, which is a common cause of a verification failure that looks like a LINE problem.
2

Select Verify and require Success

Select Verify. LINE posts an event-free payload to the endpoint, and Artemis responds once it has resolved the connection and verified the signature. LINE reports Success when this works.Treat anything else as a stop. A timeout, a non-200 response, a TLS error, and a signature failure each point somewhere different, and continuing past one means debugging later with live users watching.
3

Enable Use webhook

Turn on Use webhook.This is the step people miss. Saving a verified URL without this toggle leaves the channel looking correctly configured while message events never reach Artemis.
4

Decide about webhook redelivery

Enable redelivery only when your operations policy requires retries after a non-2xx response.LINE can deliver the same webhook more than once when redelivery is on, and it can change event order during redelivery. Your agent logic has to tolerate both, so rely on event IDs rather than arrival order before you turn this on.
5

Restrict API access by IP, if you chose a long-lived token

The channel’s Security tab accepts a list of IP addresses, individually or in CIDR notation, that may call the LINE Platform with a long-lived token.This narrows the blast radius of an indefinite credential considerably, so it’s worth doing whenever you pick that token type. LINE covers the setting under restrict who can call the API. It doesn’t apply to the other three.

Validation checklist

Verify the connection

Artemis has no synthetic test for this channel, so a real conversation is the only end-to-end proof.
  1. Add the Official Account as a friend by scanning the QR code or using the add-friend link on the Messaging API tab. Test from an ordinary LINE account rather than an identity that exists only as a console administrator, because the two behave differently.
  2. Send a short message you can search for later, and confirm the agent replies in the same chat.
  3. Count the replies. Two responses to one message means greeting messages or auto-reply messages are still enabled, not that the agent ran twice.
  4. Send each input type your agent supports, and confirm its authored behavior for each. Receiving a media event isn’t the same as handling it, so test the authored path rather than only the delivery.
  5. Test groups only if you need them. Enable Allow bot to join group chats in Official Account Manager, invite the bot, then message or mention it. Confirm sessions stay scoped to the LINE source, so a group conversation and a one-to-one conversation with the same person don’t merge.

Secure the connection

Both LINE credentials are secrets, and they do opposite jobs. The Channel Secret authenticates what comes in; the Channel Access Token authorizes what goes out. Artemis computes HMAC-SHA256 over the unchanged raw request body and compares it with the X-Line-Signature header. Any proxy or middleware in front of Artemis has to leave the signed body untouched, because a single changed byte fails verification as surely as a wrong secret does. Rotation invalidates immediately on both credentials. Reissuing a Channel Secret kills the old secret, and reissuing a long-lived access token kills the previous token unless you use the 24-hour extension. Coordinate the Artemis update with the provider-side change rather than doing them hours apart, and revoke any token you suspect someone has copied, because a compromised token can broadcast to every friend of the Official Account. Keep both values out of browser code, screenshots, tickets, and source control, and update Artemis the moment LINE reissues or revokes either one. Use distinct providers or channels for development and production, or at minimum distinct credentials and connections. Pointing two environments at one webhook mixes test traffic into real conversation history.

Manage the channel connection

Opening a connection shows four tabs. The delete control sits beside the connection name.
Connection Summary reports the connection’s state and identity.Setup Instructions shows the Webhook URL to register in the Developers Console and the Destination ID this connection matches events to, each with a copy control. Check the Destination ID here first when messages arrive and no session appears.

Troubleshoot connection issues


LINE reference

Use these LINE pages and consoles when you need detail beyond what this article covers. Related articles: