Skip to content

Line Adapter Configuration ​

Line adapter configuration reference.

Configuration Options ​

channel_access_token ​

channel_secret ​

receive_mode ​

  • Type: webhook | manual
  • Required: ❌
  • Default: webhook
  • Description: manual leaves route ownership to an existing host or queue that calls the adapter's ingest() 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 ​

  1. Visit Line Developers Console
  2. Create or select a Provider
  3. Create a new Messaging API Channel
  4. On the Channel's "Messaging API" page, click "Issue" to generate a Channel Access Token

Getting Channel Secret ​

  1. Visit Line Developers Console
  2. Select your Channel
  3. Find the Channel Secret on the "Basic settings" page

Webhook Configuration ​

After starting the onebots service, configure the Webhook URL in Line Developers Console:

  1. Go to your Channel settings
  2. Find "Webhook settings" on the "Messaging API" page
  3. Set the Webhook URL:
    https://your-domain.com/line/{account_id}/webhook
  4. Click "Verify" to verify
  5. Enable "Use webhook"

TIP

  • Webhook URL must use HTTPS
  • Ensure server is accessible from the public internet
  • Use tools like ngrok for local development