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
webhook_path
- Type:
string - Required: ❌
- Default:
/line/{account_id}/webhook - Description: Custom webhook receive path
proxy
Proxy configuration (optional).
proxy.url
- Type:
string - Required: ❌
- Description: Proxy server address, supports HTTP/HTTPS proxy
proxy.username
- Type:
string - Required: ❌
- Description: Proxy server username (if authentication required)
proxy.password
- Type:
string - Required: ❌
- Description: Proxy server password (if authentication required)
Configuration Examples
Basic Configuration
yaml
line.my_bot:
channel_access_token: 'your_channel_access_token'
channel_secret: 'your_channel_secret'Full Configuration
yaml
line.my_bot:
channel_access_token: 'your_channel_access_token'
channel_secret: 'your_channel_secret'
webhook_path: '/line/my_bot/webhook'
proxy:
url: 'http://127.0.0.1:7890'
username: 'proxy_user'
password: 'proxy_pass'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