Skip to main content

Overview

LINE tools allow you to interact with the LINE Messaging API. Supports direct messaging to specific users, broadcasting to all followers, and retrieving user profile and analytics data.

Key Features

Messaging

  • LINE_SEND_MESSAGE
    • Send a text message to a specific LINE user
    • Inputs: to (LINE user ID), message (text)
  • LINE_BROADCAST_MESSAGE
    • Broadcast a message to all users who follow your LINE Official Account
    • Inputs: message (text)

User Data

  • LINE_GET_PROFILE
    • Retrieve a user’s profile: display name, profile picture URL, status message
    • Inputs: user_id (LINE user ID)
  • LINE_GET_FRIENDS_COUNT
    • Get follower count metrics for a specific date
    • Inputs: date (yyyyMMdd format, e.g. 20250329)
  • LINE_GET_DEMOGRAPHIC
    • Get demographic breakdown of your followers (gender, age, region, app type, subscription period)
    • Inputs: none (token only)

Authentication

To use LINE tools, you need a LINE Channel Access Token from the LINE Messaging API. Note: Treat API keys as sensitive information and never commit them to public repositories. For setup instructions, see the LINE credentials guide.

Setup

1. Create a LINE Official Account

  1. Visit the LINE Developers Console
  2. Create a new Provider if you don’t have one
  3. Create a new Messaging API channel

2. Get Your Channel Access Token

  1. Open your channel in the LINE Developers Console
  2. Go to the Messaging API tab
  3. Scroll to Channel access token (long-lived) and click Issue
  4. Copy the token — this is your LINE_API.channel_access_token

3. Add LINE Credentials to JinbaFlow

Add your token as a secret in JinbaFlow with key LINE_API:

Examples

Example 1: Send a Direct Message

Example 2: Broadcast to All Followers

Example 3: Get User Profile

Example 4: Get Friends Count

Example 5: Get Demographic Data

LINE User ID Format

LINE user IDs start with U followed by 32 hexadecimal characters, e.g. U_YOUR_LINE_USER_ID. You can obtain a user’s ID from:
  • LINE webhook events (source.userId)
  • The LINE Developers Console (for test users)

Date Format

The LINE_GET_FRIENDS_COUNT tool requires dates in yyyyMMdd format:
  • 20250329 → March 29, 2025
  • Statistics are available from the day after the reference date

Demographic Data Notes

LINE_GET_DEMOGRAPHIC requires at least 20 friends in your account before data becomes available. The available field in the response indicates whether data is ready.

Resources