Skip to main content

LINE

KhunQuant connects to LINE via the LINE Messaging API. The LINEChannel adapter receives webhook events from LINE and delivers responses back through the LINE reply API.

Capabilities

  • Text message send/receive
  • Allow-listing by LINE user ID

Configuration

Add to ~/.khunquant/config.json:

{
"channels": {
"line": {
"enabled": true,
"channel_secret": "LINE_CHANNEL_SECRET",
"channel_access_token": "LINE_CHANNEL_ACCESS_TOKEN",
"allow_from": ["U1234567890abcdef"]
}
}
}

Add secrets to ~/.khunquant/.security.yml:

channels:
line:
channel_secret: "abc123..."
channel_access_token: "eyJhbGci..."
FieldTypeDescription
enabledboolEnable the LINE channel
channel_secretSecureStringLINE channel secret from LINE Developers console
channel_access_tokenSecureStringLong-lived channel access token
allow_from[]stringAllowlist of LINE user IDs

Setup steps

  1. Create a Messaging API channel at LINE Developers.
  2. Copy the Channel secret and Channel access token.
  3. Add both to .security.yml.
  4. Configure your LINE webhook URL to point to the KhunQuant gateway (e.g. https://your-host/webhook/line).
  5. Start KhunQuant.
Webhook requirement

LINE requires a publicly accessible HTTPS webhook. Use a tunnel (e.g. ngrok) for local development.