TypeClawTypeClaw
Reference

LINE

Personal-account adapter — QR/email login, plain-text messaging, and capabilities

Part of the channel adapters family.

Transport: LINE protocol (no public URL required). Setup walkthrough: Add a channel.

Use a dedicated account

LINE runs as a real user account, not a bot account. Other participants see that account's name and profile photo. Run this adapter only on a dedicated agent account you are comfortable operating as the agent.

Auth

Sub-device login using QR code or email/password plus PIN. Credentials are stored in secrets.json#channels.line as one or more account records.

Unlike bot-token adapters, secrets.json#channels.line is not a flat credential object — it wraps one or more account records:

{
  "channels": {
    "line": {
      "currentAccount": "<accountId>",
      "accounts": {
        "<accountId>": {
          "account_id": "<accountId>",
          "auth_token": "…",
          "certificate": "…",
          "device": "DESKTOPMAC",
          "display_name": "…",
          "created_at": "…",
          "updated_at": "…"
        }
      }
    }
  }
}
FieldNotes
currentAccountstring | null — active account id, or null if none
accounts.<accountId>Map of account id → account record (fields below)

Each record under accounts.<accountId>:

FieldNotes
account_idAccount identifier (matches the map key)
auth_tokenCurrent session token
certificateoptional — device certificate that can skip the e-mail/PIN step on later re-login
deviceLINE device type (DESKTOPWIN, DESKTOPMAC, ANDROID, ANDROIDSECONDARY, IOS, or IOSIPAD)
display_nameoptional — account display name
created_atRecord creation timestamp
updated_atLast-update timestamp

CLI: typeclaw channel add line (interactive QR or email login). Use typeclaw channel set line to rotate credentials.

Capabilities

FeatureSupportedNotes
Outbound messagesyesPlain text only
Reactionsno
Typing indicatorno
Channel-name resolutionyes
Self identityyes
HistoryyesLimit 200 messages
AttachmentsnoInbound placeholders only; no fetchable bytes or outbound upload
Membershipno

Chat buckets

LINE chats are grouped into workspace buckets for match rules and permissions:

BucketNotes
@line-dm1:1 direct messages
@line-groupGroup or room chats
@line-squareOpenChat-style public communities

Use the line platform token in role match rules: line:* covers all LINE chats, while line:dm/*, line:group/*, and line:square/* cover each bucket. A concrete chat is addressed by its bucket, e.g. line:dm/<chatId>, line:group/<chatId>, or line:square/<chatId>line:<chatId> (no bucket) does not match, since the parser reads an unbucketed scope as a workspace and LINE chats live under bucket workspaces.

Quirks

  • Plain text only: LINE has no rich-text formatting. The adapter strips common markdown before sending, but write messages for a plain-text surface.
  • No outbound attachments: channel_send / channel_reply calls with attachments are rejected because the SDK exposes text sends only.
  • No surfaced mentions or replies: group and square engagement is alias-driven; there is no platform-native @mention or per-message reply syntax available to the adapter.
  • Provisional registration: chats not surfaced by getChats are registered provisionally on first message as @line-group until the next refresh can classify them.

Config

{
  "channels": {
    "line": {
      "enabled": true,
      "engagement": {
        "trigger": ["mention", "reply", "dm"],
        "stickiness": { "perReply": { "window": 900000 } }
      },
      "history": {
        "prefetch": {
          "thread": { "head": 3, "tail": 10 },
          "channel": { "tail": 10 }
        }
      },
      "quotedReply": { "enabled": true, "queueDelayMs": 10000 }
    }
  }
}

All fields above are shared across adapters. No adapter-specific extensions exist for line. Credentials live in secrets.json#channels.line.

See also

On this page