Line
Prerequisites
- A channel created on the LINE Developers Console (opens in a new tab).
- The same channel added to your LINE official account
Setting up the LINE integration in Botpress
- Go to the Integration Hub (opens in a new tab) in Botpress Cloud (if you don't have the integration installed yet).
- Find and open the LINE integration then click on the "Install to Bot" button, now go back to your bot settings.
The LINE integration has the following settings:
- Enabled: Whether Botpress will communicate with LINE
- Webhook URL: The URL for receiving data in Botpress
- Channel Access Token: The token used to authenticate the channel
- Channel Secret: The secret used to verify the signature between LINE and Botpress
Setting up Line
Channel Access Token
To get this token, open the Messaging API tab in your channel settings in LINE, scroll to the bottom to the Channel Access Token section, and then generate a new one or copy it if the Channel access token was already issued, then paste it in Botpress.
For Long-Lived Channel Access Token: read this LINE documentation (opens in a new tab).
Channel Secret
The Channel Secret is used to verify the signature (opens in a new tab) between LINE and Botpress.
To get the secret, open the Basic settings tab in your channel configuration in LINE, scroll to the bottom to the Channel Secret section, and then copy the secret.
Finalizing Channel Configuration
The next step is to Enable the channel from the top of the screen and copy the webhook URL from the button below the webhook URL. Then click Save.
Now, we proceed to the last step by setting your webhook URL (opens in a new tab) in LINE.
That's it, you may now start chatting with your bot on LINE!
Content Types Mapping
From Botpress to LINE
-
Text is mapped to Text Object (opens in a new tab)
-
Text with Markdown is mapped to Text Object (opens in a new tab)
-
Image is mapped to Image Object (opens in a new tab)
-
Audio is mapped to Audio Object (opens in a new tab)
-
Video is mapped to Video Object (opens in a new tab)
-
File is NOT supported in LINE Message Types (opens in a new tab)
-
Location is mapped to Location Object (opens in a new tab)
-
Carousel is mapped to Flex Object (opens in a new tab)
-
Card is mapped to Flex Object (opens in a new tab)
-
Dropdown is mapped to Flex Object (opens in a new tab)
-
Choice is mapped to Flex Object (opens in a new tab)
From LINE to Botpress
- Text is mapped to Text Object
- The rest of the types are not currently processed by Botpress