Use the LINE Messaging CLI from KosmoKrator to call LINE Messaging tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
LINE Messaging can be configured headlessly with `kosmokrator integrations:configure line`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure line --set access_token="$LINE_ACCESS_TOKEN" --enable --read allow --write ask --jsonkosmokrator integrations:doctor line --jsonkosmokrator integrations:status --json
Credentials
Authentication type: Bearer tokenbearer_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
access_token
LINE_ACCESS_TOKEN
Secret secret
yes
Channel Access Token
url
LINE_URL
URL url
no
API Base URL
Call LINE Messaging Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to LINE Messaging.
line.line_send_message
Write write
Send a push message to a specific LINE user, group, or room. Supports text, image, video, sticker, location, flex, and other message types.
LINE user ID, group ID, or room ID to send the message to.
messages
array
yes
Array of message objects. Each message must have a "type" (e.g., "text", "image", "sticker") and corresponding fields. Example for text: [{"type": "text", "text": "Hello!"}].
notification_disabled
boolean
no
If true, the recipient will not receive a push notification. Default: false.
line.line_broadcast_message
Broadcast a message to all users who have added the LINE Official Account as a friend. Supports all message types.
Array of message objects to broadcast. Each message must have a "type" (e.g., "text", "image", "flex"). Example: [{"type": "text", "text": "Announcement!"}].
notification_disabled
boolean
no
If true, recipients will not receive push notifications. Default: false.
line.line_get_profile
Get the profile information of a LINE user, including display name, profile image URL, status message, and language.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.