Skip to content

Line Channel

Use a LINE channel when the real audience already lives in LINE and you want onboarding to happen inside LINE itself.

For Codeer, the important live endpoints are Webhook URL and LIFF Entry URL. A LINE publish mostly turns message intake on or off. The bound agent still answers with its current published version.

What you need before you start

  • One agent with at least one published version
  • Permission to edit channels in the workspace
  • Access to:
    • LINE Official Account Manager
    • LINE Developers Console
  • A public HTTPS Codeer environment
  • A working email inbox for the first verification test

Why public HTTPS matters

LINE only accepts webhook and LIFF endpoints over public HTTPS with a browser-trusted certificate. If the Webhook URL or LIFF Entry URL from Codeer is not publicly reachable, the LINE setup will fail at the verify step.

What you will create in LINE

  1. A LINE Official Account

  2. Messaging API enabled on that official account

  3. A Messaging API channel in LINE Developers Console

  4. A LINE Login channel under the same Provider

  5. A LIFF app on that LINE Login channel

Use the same Provider for Messaging API and LINE Login

Codeer expects the Messaging API channel, the LINE Login channel, and the LIFF app to belong to the same LINE Provider. LINE also keeps user IDs provider-scoped, and channels cannot be moved to another provider later.

Codeer currently expects the LINE Login plus LIFF path

LINE now recommends creating many new LIFF apps as a LINE MINI App. Codeer's current LINE integration still asks for LIFF ID and LINE Login Channel ID, so the supported setup for now is a LINE Login channel with a LIFF app attached to it.

Full setup flow

  1. Create the Codeer LINE channel and copy the two Codeer URLs

    • In Codeer, publish the target agent from Editor first.
    • Open Channels.
    • Click New Channel.
    • Choose LINE Bot.
    • Give the channel a stable Name and Slug.
    • In the LINE channel Configuration, copy:
      • Webhook URL
      • LIFF Entry URL
    • Do not publish the Codeer LINE channel yet. First finish the LINE-side setup and paste the LINE credentials back into Codeer.
  2. Create the LINE Official Account and enable Messaging API

    • Open the official account home
      • Sign in to LINE Official Account Manager with the LINE Business account that owns the bot.
      • Open the official account you want end users to add as a friend and message.
      • You should land on the account home dashboard, not the settings screen yet.

    LINE Official Account Manager home for the target official account

    • Open account settings
      • Click Settings in the upper-right corner.
      • The page should change to Account settings.

    LINE Official Account settings page with the left settings navigation

    • Open the Messaging API page
      • In the left sidebar under settings, click Messaging API.
      • If Messaging API has not been enabled yet, the page shows status Unused and a green Enable Messaging API button.

    Messaging API page before activation, showing the Enable Messaging API button

    • Start Messaging API activation

      • Click Enable Messaging API.
      • A provider selection dialog opens.
    • Choose the Provider carefully

      • Either create a new provider or choose an existing one.
      • If this bot belongs to your own team, the provider name is mainly for internal organization. Use any clear name.
      • If you already know which Provider will also hold the LINE Login channel, choose that same Provider now.
      • Click Agree to continue.

    Provider selection dialog when enabling Messaging API

    • Skip policy URLs for now if needed
      • LINE then asks for Privacy policy URL and Service terms URL.
      • If you do not have those pages yet, leave both fields empty for now.
      • These fields are optional at this stage and can be edited later.
      • Click Confirm.

    Privacy policy URL and service terms URL dialog, which can be left blank for now

    • Confirm Messaging API activation
      • LINE shows a final confirmation dialog with the official account name and provider name.
      • Review the provider carefully before confirming.
      • Click Confirm again to finish enabling Messaging API.

    Final confirmation dialog before enabling Messaging API

    • Paste and save the Codeer webhook

      • After activation, the same Messaging API page changes from Unused to In use.
      • You should now see:
        • Channel ID
        • Channel secret
        • a Webhook URL field
        • a LINE Developers Console link near the bottom
      • Paste Codeer's Webhook URL into the webhook field.
      • Click Save.
    • Continue to LINE Developers Console

      • Click the LINE Developers Console link on that page.
      • Confirm that a Messaging API channel was created for the same Provider.
      • Keep using that same Provider for the later LINE Login channel and LIFF setup.

    Messaging API page after activation, showing Channel ID, Channel secret, webhook field, and LINE Developers Console link

    This flow changed on September 4, 2024

    Messaging API channels are no longer created directly in LINE Developers Console. The current flow starts in LINE Official Account Manager, then continues in LINE Developers Console.

  3. Open the matching Messaging API channel in LINE Developers Console

    • Open the same Provider
      • In LINE Developers Console, stay inside the same Provider that was selected when you enabled Messaging API.
      • On the Channels tab, find the Messaging API card whose display name matches the LINE Official Account you just enabled.
      • Do not pick a different Messaging API card just because it sits under the same Provider. The Channel Secret, access token, webhook, and LINE Official Account must all belong to the same channel.

    LINE Developers Console Provider page showing the matching Messaging API channel card

    • Copy the Messaging API Channel Secret
      • Click the matching Messaging API channel card.
      • Open Basic settings.
      • Scroll to Channel secret.
      • Copy Channel secret. You will paste this into Codeer later.

    Messaging API channel Basic settings page showing where to copy Channel secret

  4. Configure the Messaging API channel

    • Open the Messaging API tab and finish webhook setup
      • Return to the same Messaging API channel in LINE Developers Console.
      • Open the Messaging API tab.
      • In Webhook settings, paste the Codeer Webhook URL if it is not already there.
      • Turn on Use webhook.
      • Turn on Webhook redelivery.
      • Turn on Error statistics aggregation.

    Messaging API tab showing Webhook URL, Use webhook, Webhook redelivery, and Error statistics aggregation

    • Issue the long-lived access token
      • Scroll down to Channel access token.
      • Click Issue next to Channel access token (long-lived).
      • Copy the issued token and keep it ready for Codeer.

    Messaging API tab showing the Channel access token section and Issue button

    Avoid duplicate replies during testing

    In LINE Official Account Manager, disable Greeting messages and Auto-reply messages if you want Codeer to be the only responder. Otherwise users may see both LINE's built-in messages and Codeer's replies.

  5. Create the LINE Login channel on the same Provider

    Only needed for LINE login or form flows

    This step is only needed when you want users to log in inside LINE to collect email, or when you want to use Request Form. Those flows rely on LINE Login plus LIFF.

    • Go back to the Provider channel list
      • Open the same Provider again in LINE Developers Console.
      • On the Channels tab, click Create a new channel.

    Provider page showing where to click Create a new channel

    • Choose LINE Login
      • In the channel type dialog, select LINE Login.

    Create a new channel dialog with LINE Login selected

    • Create the LINE Login channel
      • LINE opens the channel creation form.
      • Use a name that clearly ties this channel to the same bot, for example <Official Account Name> LIFF.
      • Set App types to include Web app.
      • Finish the required fields and create the channel.
      • After creation, open Basic settings and copy its Channel ID. You will paste this into Codeer later as LINE Login Channel ID.

    Publish the LINE Login channel before real users test

    A new LINE Login channel starts in Developing status. In that state, only admins and testers can use it. If you want normal end users to finish the LIFF verification flow, change the LINE Login channel to Published.

  6. Create the LIFF app on the LINE Login channel

    • Open the LIFF tab and add a LIFF app

      • In the LINE Login channel, open the LIFF tab.
      • Click Add.
    • Fill the LIFF app basics

      • Set LIFF app name to something recognizable, such as <Official Account Name> LIFF.
      • Set Size to Full.
      • Paste Codeer's LIFF Entry URL into Endpoint URL.

    Add a LIFF app form showing the LIFF app name, Size, and Endpoint URL fields

    • Choose scopes and add-friend behavior
      • Turn on openid.
      • Turn on profile.
      • Leave other scopes off unless you explicitly need them.
      • Set Add friend option to On (Normal).
      • Create the LIFF app.

    Add a LIFF app form showing the openid and profile scopes plus the Add friend option

    • Copy the LIFF ID
      • After the LIFF app is created, copy the LIFF ID from the LIFF app list.

    LIFF app list showing where to copy the LIFF ID

    What LIFF is doing in this setup

    LIFF is the in-LINE web surface Codeer uses for email verification and for request-form flows. If LIFF is missing or points to the wrong endpoint, users can add the bot but cannot complete the in-LINE verification flow.

  7. Finish the LINE configuration in Codeer

    • Paste the LINE values back into Codeer
      • Return to the Codeer LINE form.
      • Paste these values into Codeer:
        • Channel Secret
        • Channel Access Token
      • If you created LINE Login plus LIFF for LINE-side login/email collection or Request Form, also paste:
        • LIFF ID
        • LINE Login Channel ID
      • Choose the published agent that should answer LINE messages.
      • Save the configuration.

    Only published agents appear in the selector

    If the agent is missing, go back to Editor, publish it, and then return to the LINE channel page.

  8. Publish the Codeer LINE channel

    • Publish the channel after the webhook, LIFF app, credentials, and agent binding are all ready.
    • Unpublish it when you want to stop accepting new LINE events.

First live test

Run one full end-to-end test with a real LINE account before sharing the bot widely.

  1. Add the LINE Official Account as a friend.

  2. Confirm the user receives the email verification card.

  3. Send one real text message.

  4. Open the LIFF page inside LINE.

  5. Enter an email address and submit the 6-digit code from the email.

  6. Send another message and confirm the correct agent replies.

  7. Confirm the conversation appears in Histories.

The first AI reply comes after verification

Before email verification finishes, the user sees the onboarding card instead of a normal agent answer. If the first card was skipped, the same verification card appears again on later unverified messages.

Form requests inside LINE

If the agent uses Request Form, Codeer reuses the same LIFF app.

The expected flow is:

  • the user receives a form card in LINE
  • the card opens the requested form inside LIFF
  • the user submits or rejects the form
  • the conversation resumes in the same LINE thread

Important behavior

  • A LINE channel must be published in Codeer before the webhook accepts events.
  • Future LINE replies use the current published version of the bound agent.
  • Saving LINE credentials or changing the bound agent updates the live configuration immediately. Publish is mainly the switch that allows LINE events in.
  • If you rotate the Messaging API access token in LINE, update the same token in Codeer right away.

Anyone who can message the bot can start the verification flow

Once the LINE channel is published, any LINE user who can reach that bot can open the LIFF verification flow. Use a separate test bot if you need a tighter pilot.

Troubleshooting

  1. The webhook Verify button fails or the bot never responds

    • Confirm the Codeer Webhook URL is public HTTPS.
    • Confirm Use webhook is enabled.
    • Confirm Channel Secret and Channel Access Token come from the same Messaging API channel.
    • Confirm the Codeer LINE channel itself is published.
  2. The LIFF page works for admins but not for normal users

    • Confirm the LINE Login channel is Published, not Developing.
    • Confirm the LIFF app belongs to that same LINE Login channel.
  3. LIFF opens but email verification fails

    • Confirm the LIFF app endpoint is exactly the Codeer LIFF Entry URL.
    • Confirm LINE Login Channel ID in Codeer matches the Channel ID of the LINE Login channel that owns the LIFF app.
    • Reopen the page from inside LINE if the page says the LINE ID token is missing or expired.
  4. Users receive unexpected greeting or duplicate messages

    • Disable Greeting messages and Auto-reply messages in LINE Official Account Manager.
    • Re-test after saving the Official Account settings.
  5. The user gets a code but cannot finish verification

    • Verification codes expire after 10 minutes.
    • Resending is throttled for 60 seconds.
    • One email cannot be bound to a different LINE identity in the same workspace.
  6. The bot says no published agent is configured or answers with the wrong behavior

    • Publish the bound agent in Editor.
    • Recheck which agent is selected in the Codeer LINE configuration.

Official LINE references