You can configure your bot to communicate with people through the LINE app. This article describes how to create a LINE channel using the LINE Developers Console, connect your bot to your LINE channel in Azure, and test your bot in the LINE mobile app.
Prerequisites
An Azure account. If you don't already have one, create a free account before you begin.
An existing bot published to Azure.
A mobile device with the LINE app and a QR reader.
Create a channel in the LINE Developers Console
To build bots with LINE, you need to create a channel in the LINE Developers Console. Follow the steps in the documentation below that are relevant to you before continuing:
Select the channel you created earlier from Recently visited channels.
Select the Messaging API setting and scroll down to Webhook settings. Enter the Webhook URL from Azure and select Update.
Select the Verify button under the URL. A success message will appear if the webhook URL is properly configured.
Then enable Use webhook, shown below:
Important
In LINE Developers Console, set the webhook URL before you enable Use webhook. Enabling webhooks with an empty URL won't set the enabled status, even though the UI may say otherwise.
After adding a webhook URL and enabling Use webhook, reload this page and verify that the changes were set correctly.
Test your bot
Once you've completed these steps, your bot will be successfully configured to communicate with users on LINE. The steps below explain how to test your bot.
Add your bot to your LINE mobile app
To test your bot, you need to use the LINE mobile app.
Scroll up in the Messaging API tab to see the bot's QR code.
Using a mobile device with the LINE app installed, scan the QR code and select the link that appears.
You should now be able to interact with your bot in your mobile LINE app and test your bot.
Automatic messages
When you start testing your bot, it may send unexpected messages that aren't the ones you specified in the conversationUpdate activity.
To avoid sending these messages, take the following steps:
Go to the LINE Developers Console and select your channel. Then select the Messaging API tab.
Scroll down to the LINE Official Account features section. Find Auto-reply messages and select the Edit link.
A new page titled Response settings will open up. Under Detailed settings set Auto-response to Disabled.
Alternatively, you can choose to keep these messages. Select Auto-response message settings to edit the auto response message.
Additional information
Troubleshooting
If your bot isn't responding to any of your messages, go to your bot in Azure portal, and select Test in Web Chat.
If the bot works there but doesn't respond in LINE, reload your LINE Developer Console page and repeat the webhook instructions above. Be sure you set the Webhook URL before enabling webhooks.
If the bot doesn't work in Web Chat, debug the bot issue and then finish configuring your LINE channel.