Line Adapter Configuration
Line adapter configuration reference.
Configuration Options
channel_access_token
- Type:
string - Required: ✅
- Description: Line Channel Access Token, obtained from Line Developers Console
channel_secret
- Type:
string - Required: ✅
- Description: Line Channel Secret, obtained from Line Developers Console
receive_mode
- Type:
webhook | manual - Required: ❌
- Default:
webhook - Description:
manualleaves route ownership to an existing host or queue that calls the adapter'singest()method
destination
- Type:
string - Required: ❌
- Description: LINE destination user ID; when set, events addressed to another bot are rejected
Configuration Examples
Basic Configuration
yaml
line.my_bot:
channel_access_token: 'your_channel_access_token'
channel_secret: 'your_channel_secret'Existing host integration
yaml
line.my_bot:
channel_access_token: 'your_channel_access_token'
channel_secret: 'your_channel_secret'
receive_mode: manual
destination: 'U0123456789abcdef0123456789abcdef'Getting Channel Access Token
- Visit Line Developers Console
- Create or select a Provider
- Create a new Messaging API Channel
- On the Channel's "Messaging API" page, click "Issue" to generate a Channel Access Token
Getting Channel Secret
- Visit Line Developers Console
- Select your Channel
- Find the Channel Secret on the "Basic settings" page
Webhook Configuration
After starting the onebots service, configure the Webhook URL in Line Developers Console:
- Go to your Channel settings
- Find "Webhook settings" on the "Messaging API" page
- Set the Webhook URL:
https://your-domain.com/line/{account_id}/webhook - Click "Verify" to verify
- Enable "Use webhook"
TIP
- Webhook URL must use HTTPS
- Ensure server is accessible from the public internet
- Use tools like ngrok for local development