Line App Integration Setup
Setup Line app integration on your local machine for development
Setup Line app integration on your local machine
Please follow the steps if you are trying to work with the Line integration on your local machine.
Prerequisites
- Line Developer Account
- Access to Line Developer Console
- Ngrok or similar tunneling service
- Running Chatwoot development environment
Setup Steps
1. Start Ngrok Server
Start a Ngrok server listening at port 3000
or the port you will be running the Chatwoot installation:
2. Update Environment Variables
Update the .env
variable FRONTEND_URL
in Chatwoot with the https
version of the Ngrok URL:
3. Configure Line Developer Console
- Access Line Developer Console: Go to Line Developer Console
- Create a Provider (if you don’t have one)
- Create a New Channel and select “Messaging API”
- Configure Basic Settings:
- Channel name
- Channel description
- Category
- Subcategory
4. Get Required Credentials
From the Line Developer Console under the “Messaging API” channel, collect the following values:
- Channel Name
- LINE Channel ID
- LINE Channel Secret
- LINE Channel Token
5. Start Chatwoot Server
Start the Chatwoot server and create a new Line channel with the values obtained from Line Developer Console:
6. Create Line Channel in Chatwoot
- Access Chatwoot: Go to your Chatwoot instance (http://localhost:3000)
- Navigate to Settings → Inboxes → Add Inbox
- Select Line as the channel type
- Enter Line Credentials:
- Channel Name
- LINE Channel ID
- LINE Channel Secret
- LINE Channel Token
- Save Configuration
Configure Webhook in Line Developer Console
After creating the channel, Chatwoot will provide a webhook URL for the channel. You need to configure this webhook URL in the Line Developer Console:
Steps to Configure Webhook
- Go to Line Developer Console → Your Channel → Messaging API
- Find Webhook Settings
- Set Webhook URL: Use the URL provided by Chatwoot
- Enable Webhook: Toggle the webhook to “Enabled”
- Verify Webhook: Use the “Verify” button to test the connection
Additional Line Settings
Configure these settings in the Line Developer Console:
- Auto-reply messages: Disable (so Chatwoot can handle responses)
- Greeting messages: Optional
- Webhook redelivery: Enable for reliability
Testing the Integration
If the webhook is registered correctly with Line, your Ngrok server should receive events for new Line messages, and new conversations will be created in Chatwoot.
Test Steps
- Add your Line bot as a friend using the QR code or bot ID
- Send a message to your Line bot
- Check Ngrok logs to see if the webhook request is received
- Check Chatwoot to see if a new conversation is created
- Reply from Chatwoot to test bidirectional communication
Troubleshooting
Line API Features
Line offers various features you can integrate:
- Rich Messages: Cards, carousels, quick replies
- Flex Messages: Custom layouts
- LIFF (Line Frontend Framework): Web apps within Line
- Line Login: User authentication
Next Steps
After successful setup:
- Test message flow between Line and Chatwoot
- Configure agent assignments for Line conversations
- Set up automated responses if needed
- Explore rich message features for enhanced user experience
- Review webhook logs for debugging
Getting Help
If you encounter issues:
- Check Logs: Review both Chatwoot and Ngrok logs
- Line Developers Documentation: Official Line API Docs
- Common Errors: See Common Errors
- Community Support: Discord
Useful Resources
- Line Messaging API Documentation: https://developers.line.biz/en/docs/messaging-api/
- Line Developer Console: https://developers.line.biz/console
- Webhook Test Tool: Available in Line Developer Console
Your Line integration is now ready for development and testing! 💬