> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langbot.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrating LINE Bot

This article explains how to connect LangBot with the LINE platform to implement LINE bot functionality.

## Creating a LINE Bot

### Register a LINE Developer Account

1. Visit the [LINE Developers website](https://developers.line.biz/) and log in with your LINE account
2. After logging in, enter the developer console

### Create Provider and Channel

> [Developer Console](https://developers.line.biz/console)

1. In the developer console, create a new Provider (if you don't have one)
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line01.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=a13b8620a00caa05fccbc30af46677c2" alt="alt text" width="1903" height="868" data-path="images/zh/deploy/bots/line/line01.png" />

2. Under the Provider, click "Create"
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line02.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=b7f5bd9332592c4603b2bf214f418d94" alt="alt text" width="1889" height="869" data-path="images/zh/deploy/bots/line/line02.png" />

3. Enter a name and click Create
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line03.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=af69cbd6e8cd056553a6a4e94c435e1c" alt="alt text" width="1904" height="865" data-path="images/zh/deploy/bots/line/line03.png" />

4. After being redirected, select Create a Message API
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line04.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=7415f81d8a56491b7dd8ed810c7ed5aa" alt="alt text" width="1892" height="872" data-path="images/zh/deploy/bots/line/line04.png" />

* Continue by clicking Create a Message API
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line05.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=1eab450322616bc97ad2441080b483d9" alt="alt text" width="1842" height="829" data-path="images/zh/deploy/bots/line/line05.png" />
* After being redirected, fill in the basic information
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line06.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=f7e363f62e0eb8c73bcda0809f88ba7e" alt="alt text" width="1893" height="888" data-path="images/zh/deploy/bots/line/line06.png" />
  * Channel Name
  * Channel Description
  * Category
  * Subcategory
  * Email Address

5. After filling in all information, click "Continue" to create
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line07.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=daaa875ff01affce4d567b207f5013b1" alt="alt text" width="1825" height="841" data-path="images/zh/deploy/bots/line/line07.png" />
6. Check the information you entered, and if there are no issues, click Submit
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line08.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=e2e93e568c9c5d1c616329dc3b0a56a1" alt="alt text" width="1841" height="794" data-path="images/zh/deploy/bots/line/line08.png" />
7. Successfully created, proceed to use
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line09.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=2a676d5901bacc1bcfe7dd3e0273f51c" alt="alt text" width="1885" height="877" data-path="images/zh/deploy/bots/line/line09.png" />

### Get Configuration Information

After creation, you will obtain the following important information, please record it:

1. Channel Secret

> [Page after clicking use](https://manager.line.biz/account)

* Select Settings
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line09.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=2a676d5901bacc1bcfe7dd3e0273f51c" alt="alt text" width="1885" height="877" data-path="images/zh/deploy/bots/line/line09.png" />
* Click Message API
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line11.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=75e2fcf21b5a10f00cf37c37ff866f86" alt="alt text" width="1920" height="799" data-path="images/zh/deploy/bots/line/line11.png" />
* Enable Message API
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line12.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=e39e31b86a7266d4026f479c2e15ba6d" alt="alt text" width="1920" height="875" data-path="images/zh/deploy/bots/line/line12.png" />
* Select the Provider you just created and click Agree
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line13.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=b3613a5a9ef8e22267b2c0b9c9759ea2" alt="alt text" width="1189" height="839" data-path="images/zh/deploy/bots/line/line13.png" />
* For privacy terms, simply click OK
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line14.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=b458e9e3db14b3fc6693085e24a7b899" alt="alt text" width="1159" height="947" data-path="images/zh/deploy/bots/line/line14.png" />
* Click OK to complete creation
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line15.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=7c91b666d54d183ee0a86dd16eda9cf5" alt="alt text" width="1920" height="879" data-path="images/zh/deploy/bots/line/line15.png" />
* Copy it
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line16.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=bc3457b23d78b4a08de6b856cf40e5f4" alt="alt text" width="1888" height="842" data-path="images/zh/deploy/bots/line/line16.png" />

2. Channel Access Token (need to click the "Issue" button to generate)

* Click console or directly visit [Console](https://developers.line.biz/console/)
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line17.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=e60c4f29ea6d83e3e4d560bb951b3869" alt="alt text" width="1907" height="852" data-path="images/zh/deploy/bots/line/line17.png" />
* Select the Provider you created and click Message API
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line18.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=a5d7e5d239240f2b75a4bc2a6288332c" alt="alt text" width="1877" height="879" data-path="images/zh/deploy/bots/line/line18.png" />
* Click Message API
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line19.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=614d84c02e8fb34a92a97e8ae64dcaa1" alt="alt text" width="1915" height="901" data-path="images/zh/deploy/bots/line/line19.png" />
* Scroll to the bottom, click Issue
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line20.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=e35012762bee2c9bcbdf48a83ee42639" alt="alt text" width="1878" height="810" data-path="images/zh/deploy/bots/line/line20.png" />
* Click the icon to copy
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line21.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=566ff66cac84a039e8ec4b87495f86cb" alt="alt text" width="1903" height="851" data-path="images/zh/deploy/bots/line/line21.png" />

## Connecting to LangBot

Next, open the LangBot configuration page:

1. Click "Bots", then click "Add"
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line26.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=f0cc67db904c7cbdfc8fd9454edc44dc" alt="alt text" width="1708" height="788" data-path="images/zh/deploy/bots/line/line26.png" />

2. Select "LINE" in "Platform/Adapter Selection"
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line27.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=743d78febb3a87f7fe6736e1a277765a" alt="alt text" width="897" height="562" data-path="images/zh/deploy/bots/line/line27.png" />

3. Fill in the configuration information:
   * Channel Secret: The Channel secret you obtained earlier
   * Channel Access Token: The Channel access token you obtained earlier
     <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line28.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=62abe5cdc3df626137ad766fc234f51b" alt="alt text" width="1139" height="662" data-path="images/zh/deploy/bots/line/line28.png" />

4. Click "Save" to complete the configuration
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line29.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=66ff6ac8ecd301964eb542fa91a3c4c6" alt="alt text" width="1505" height="864" data-path="images/zh/deploy/bots/line/line29.png" />

## Configure Webhook

<Info>
  We recommend that you first refer to [Configure HTTP Reverse Proxy](/en/workshop/production/proxy-and-ssl) to configure the LangBot callback address.
</Info>

<Tip>
  **Don't want to set up a public server and domain?** [LangBot Cloud](https://space.langbot.app/cloud) includes built-in domain and HTTPS — get started right away.
</Tip>

* Get the Webhook callback URL from the LangBot configuration page
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line30.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=88649dd82d77e3e7b39a28bdeab847b5" alt="alt text" width="792" height="683" data-path="images/zh/deploy/bots/line/line30.png" />

* Click console or directly visit [Console](https://developers.line.biz/console/)
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line17.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=e60c4f29ea6d83e3e4d560bb951b3869" alt="alt text" width="1907" height="852" data-path="images/zh/deploy/bots/line/line17.png" />

* Select the Provider you created and click Message API
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line18.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=a5d7e5d239240f2b75a4bc2a6288332c" alt="alt text" width="1877" height="879" data-path="images/zh/deploy/bots/line/line18.png" />

* Click Message API
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line19.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=614d84c02e8fb34a92a97e8ae64dcaa1" alt="alt text" width="1915" height="901" data-path="images/zh/deploy/bots/line/line19.png" />

* Click Edit to fill in the connection
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line22.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=592b1d1c314e431058921db1b323ddaf" alt="alt text" width="1315" height="530" data-path="images/zh/deploy/bots/line/line22.png" />

* Enter the connection (must be an HTTPS connection, which means you need an SSL certificate), click Update
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line23.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=659b9924ca2c21a9882df5e2b0acd3d6" alt="alt text" width="1541" height="516" data-path="images/zh/deploy/bots/line/line23.png" />

* Select Use Webhook
  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line24.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=99bf16e4f595ecc9d0ec23cc6c83dd10" alt="alt text" width="1589" height="402" data-path="images/zh/deploy/bots/line/line24.png" />

5. Click the "Verify" button to test if the connection is successful
   <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/line/line25.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=6fd5d9d9a0a68b0e068e251726c92b49" alt="alt text" width="1414" height="504" data-path="images/zh/deploy/bots/line/line25.png" />

## Feature Configuration

In the LINE developer console, you can further configure the bot's features:

1. In the "Messaging API" tab, find the "LINE Official Account Features" section
2. Enable or disable the following features as needed:
   * Auto-reply messages
   * Welcome messages when adding friends
   * Group and multi-person chat
   * Greeting when the bot joins a group

## Usage

After configuration, users can interact with your LINE bot through the following methods:

1. Scan the QR code provided in the LINE developer console to add the bot as a friend
2. Send messages in the chat, and the bot will process and reply through LangBot

## Common Issues

### Webhook Verification Failed

* Ensure your server can be accessed via HTTPS
* Check if the Webhook URL is correct
* Confirm that the LangBot service is running properly

### Unable to Receive Messages

* Check if the Channel Access Token is valid
* Confirm that the "Use Webhook" option is enabled
* Check the LangBot logs for error messages

### Permission Issues

* Ensure you have enabled the necessary permissions for the bot in the LINE developer console
* For some advanced features, a LINE Premium account may be required
