How to create a chatbot for LINE

Steps Overview

  1. Register LINE bot (Messaging API).
  2. Configure the Webhook
  3. Delete the default responses
  4. Add your LINE bot as a new friend by using the QR code

Register LINE Bot (Messaging API)

You can find the official tutorial on how to create a channel here.

First of all create a developer account here. Yo will also need to have a LINE account.

Once registered go to the "Products" section, and select "Messaging API".

Press Start Now in the next window

You will be taken to a "Create Channel" form.
Here you can name your channel, upload an image and give it a description.

You will also need to create a new Provider. Fill all the required fields and press "Create"

In the next page you will be able to edit your channel details and get your "Channel secret" key.
Scroll to the bottom of the page and copy the key, we will need it for the next steps.

For the next step, navigate to the "Messaging API" tab of the page.
Here we will be able to set a "Webhook URL", and give it the necessary settings to fuction.

First of all scroll to the bottom to the "Channel access token" section.

Press "Issue" to create a your Channel access token. We will also need this key.

Configure the Webhook

Once you have copied both the "Channel access token" key, and the "Channel access token" key we can enter those values into the platform.

Please login to your ChatCompose account, navigate to "Integrations" and click on "LINE". You will be taken to the LINE configuration page.

Here you can enter the two keys we copied from the previous steps. Copy them to the correspondig fields and save.

You will also need to use the Webhook url provided in this page. Copy it.

Back in the LINE Console, let's go to the Webhook settings at the "Messaging API" tab.
Enter the webhook we provide in the console and press Save. Make sure to verify it afterwards.

Delete the default responses

By default, LINE will provide their own responses when someone adds your channel and sends a message.

Since we will use chatcompose to handle those tasks, we can delete the default values.

At "Messaging API", you will find the "LINE Official Account features" section.

Disable "Auto-reply messages" and "Greeting messages", and enable "Webhooks" by pressing the edit button.

Add your LINE bot as a new friend by using the QR code

In the "Messaging API" tab you will also find a QR code. Scan it with your LINE mobile app to add the channel.

You should get the initial message or script of your chatbot.


LINE can only show 20 characters from your option component. So make sure you label your options with less than 20 characters.

LINE will only be able to display your image, document and video components for the following extensions: JPG, JPEG, PNG, PDF, MP3 and MP4.

No HTML components are allowed. LINE is not a browser so it will not be able to render any HTML code.

Would you like to know more?

Get more information