API Data Provider - Online Help

Connecting to LINE

Using API Key Authentication

The LINE Messaging API uses Channel Access Token authentication. To obtain a Channel Access Token:

  1. Log in to the LINE Developers Console at https://developers.line.biz
  2. Select your provider and open your Messaging API channel.
  3. Navigate to the Messaging API tab.
  4. Under Channel access token, click Issue to generate a long-lived token.
  5. Copy the generated token.

After obtaining your Channel Access Token, set the following connection properties:

  • AuthScheme: Set this to APIKey.
Set the following in the ProfileSettings connection property:
  • APIKey: Set this to your LINE Channel Access Token.

Example Connection String

Profile=C:\profiles\LINE.apip;ProfileSettings='APIKey=your_channel_access_token;';AuthScheme=APIKey;

Connecting to LINE

Once authentication is configured, you can connect to LINE and query data from any of the available tables such as BotInfo, Followers, RichMenus, and AudienceGroups.

Available Tables

The LINE API Profile provides access to the following tables:

  • BotInfo: Returns basic information about the LINE bot channel
  • MessageQuota: Returns the message sending quota for the current month
  • MessageConsumption: Returns the number of messages sent in the current month
  • ReplyMessageDelivery: Returns the number of reply messages sent on a specific date (requires DeliveryDate)
  • PushMessageDelivery: Returns the number of push messages sent on a specific date (requires DeliveryDate)
  • MulticastMessageDelivery: Returns the number of multicast messages sent on a specific date (requires DeliveryDate)
  • BroadcastMessageDelivery: Returns the number of broadcast messages sent on a specific date (requires DeliveryDate)
  • UserProfiles: Returns the profile of a LINE user (requires UserId)
  • Followers: Returns user IDs of users who follow the LINE bot; supports cursor-based pagination
  • GroupSummary: Returns the name and icon URL of a LINE group chat (requires GroupId)
  • GroupMemberCount: Returns the number of members in a LINE group chat (requires GroupId)
  • GroupMemberIds: Returns user IDs of members in a LINE group chat (requires GroupId)
  • GroupMemberProfiles: Returns the profile of a member within a LINE group chat (requires GroupId and UserId)
  • RoomMemberCount: Returns the number of members in a LINE multi-person chat room (requires RoomId)
  • RoomMemberIds: Returns user IDs of members in a LINE multi-person chat room (requires RoomId)
  • RoomMemberProfiles: Returns the profile of a member within a LINE multi-person chat room (requires RoomId and UserId)
  • RichMenus: Returns all rich menus associated with the LINE channel
  • RichMenuAliases: Returns all rich menu aliases associated with the LINE channel
  • UserRichMenu: Returns the rich menu linked to a specific LINE user (requires UserId)
  • DefaultRichMenu: Returns the ID of the default rich menu applied to all users
  • MembershipPlans: Returns all membership plans configured for the LINE channel
  • MembershipSubscriptions: Returns active membership subscriptions for a LINE user (requires UserId)
  • MembershipUsers: Returns user IDs subscribed to a membership plan (requires MembershipId)
  • InsightDemographics: Returns demographic data of users who have added the LINE bot as a friend
  • InsightMessageDelivery: Returns message delivery statistics per message type for a given date (requires DeliveryDate)
  • InsightFollowers: Returns follower count statistics for a given date (requires DeliveryDate)
  • InsightMessageEvents: Returns engagement statistics for a broadcast or narrowcast message (requires RequestId)
  • AudienceGroups: Returns audience groups; filter by AudienceGroupId for details or use Status, Description, and CreatedRoute to narrow list results

Important Notes

  • Channel Access Tokens expire after 30 days; stateless tokens do not expire. Reissue as needed from the LINE Developers Console.
  • Several tables require mandatory filter parameters (e.g., UserId, GroupId, RoomId, MembershipId, DeliveryDate, RequestId) — these are enforced at query time.
  • The DeliveryDate filter accepts dates in yyyyMMdd format (e.g., 20240115).
  • Timestamp fields (JoinedAt, CreatedAt, ExpiredAt, SnapshotAt) are stored as Unix timestamps.
  • Cursor-based pagination (Followers, GroupMemberIds, RoomMemberIds, MembershipUsers) uses the Next field as the cursor token for subsequent requests.
  • Insight data becomes available the day after message delivery.
  • Rate limits vary by endpoint and messaging plan — refer to the LINE Messaging API documentation for current limits.

API Documentation

For more information about the LINE Messaging API, see the official LINE Messaging API documentation.

Usage Examples

BotInfo:

SELECT * FROM BotInfo

MessageQuota:

SELECT * FROM MessageQuota

MessageConsumption:

SELECT * FROM MessageConsumption

ReplyMessageDelivery:

SELECT * FROM ReplyMessageDelivery WHERE DeliveryDate = '20240115'

PushMessageDelivery:

SELECT * FROM PushMessageDelivery WHERE DeliveryDate = '20240115'

MulticastMessageDelivery:

SELECT * FROM MulticastMessageDelivery WHERE DeliveryDate = '20240115'

BroadcastMessageDelivery:

SELECT * FROM BroadcastMessageDelivery WHERE DeliveryDate = '20240115'

UserProfiles:

SELECT * FROM UserProfiles WHERE UserId = 'U1234567890abcdef'

Followers:

SELECT * FROM Followers

GroupSummary:

SELECT * FROM GroupSummary WHERE GroupId = 'C1234567890abcdef'

GroupMemberCount:

SELECT * FROM GroupMemberCount WHERE GroupId = 'C1234567890abcdef'

GroupMemberIds:

SELECT * FROM GroupMemberIds WHERE GroupId = 'C1234567890abcdef'

GroupMemberProfiles:

SELECT * FROM GroupMemberProfiles WHERE GroupId = 'C1234567890abcdef' AND UserId = 'U1234567890abcdef'

RoomMemberCount:

SELECT * FROM RoomMemberCount WHERE RoomId = 'Ra1234567890abcdef'

RoomMemberIds:

SELECT * FROM RoomMemberIds WHERE RoomId = 'Ra1234567890abcdef'

RoomMemberProfiles:

SELECT * FROM RoomMemberProfiles WHERE RoomId = 'Ra1234567890abcdef' AND UserId = 'U1234567890abcdef'

RichMenus:

SELECT * FROM RichMenus

RichMenuAliases:

SELECT * FROM RichMenuAliases

UserRichMenu:

SELECT * FROM UserRichMenu WHERE UserId = 'U1234567890abcdef'

DefaultRichMenu:

SELECT * FROM DefaultRichMenu

MembershipPlans:

SELECT * FROM MembershipPlans

MembershipSubscriptions:

SELECT * FROM MembershipSubscriptions WHERE UserId = 'U1234567890abcdef'

MembershipUsers:

SELECT * FROM MembershipUsers WHERE MembershipId = 12345

InsightDemographics:

SELECT * FROM InsightDemographics

InsightMessageDelivery:

SELECT * FROM InsightMessageDelivery WHERE DeliveryDate = '20240115'

InsightFollowers:

SELECT * FROM InsightFollowers WHERE DeliveryDate = '20240115'

InsightMessageEvents:

SELECT * FROM InsightMessageEvents WHERE RequestId = '12345678-1234-1234-1234-123456789012'

AudienceGroups:

SELECT * FROM AudienceGroups WHERE Status = 'READY'

Connection Properties

The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider.


Property Description
APIKey The Channel Access Token used to authenticate with the LINE Messaging API.
AuthScheme The scheme used for authentication. Accepted entries are APIKey or None.
Allowed values are: BASIC, NONE, NTLM, OAUTH, APIKEY, OAUTH_CLIENT, OAUTH_PASSWORD

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770.0