Skip to content

@line/bot-sdk


@line/bot-sdk / insight / InsightClient

Class: InsightClient

Defined in: lib/insight/api/insightClient.ts:38

Constructors

new InsightClient()

new InsightClient(config): InsightClient

Defined in: lib/insight/api/insightClient.ts:41

Parameters

config

httpClientConfig

Returns

InsightClient

Methods

getFriendsDemographics()

getFriendsDemographics(): Promise<GetFriendsDemographicsResponse>

Defined in: lib/insight/api/insightClient.ts:69

Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID).

Returns

Promise<GetFriendsDemographicsResponse>

See

Documentation


getFriendsDemographicsWithHttpInfo()

getFriendsDemographicsWithHttpInfo(): Promise<ApiResponseType<GetFriendsDemographicsResponse>>

Defined in: lib/insight/api/insightClient.ts:79

Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID). . This method includes HttpInfo object to return additional information.

Returns

Promise<ApiResponseType<GetFriendsDemographicsResponse>>

See

Documentation


getMessageEvent()

getMessageEvent(requestId): Promise<GetMessageEventResponse>

Defined in: lib/insight/api/insightClient.ts:94

Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account.

Parameters

requestId

string

Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID.

Returns

Promise<GetMessageEventResponse>

See

Get user interaction statistics Documentation


getMessageEventWithHttpInfo()

getMessageEventWithHttpInfo(requestId): Promise<ApiResponseType<GetMessageEventResponse>>

Defined in: lib/insight/api/insightClient.ts:108

Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. . This method includes HttpInfo object to return additional information.

Parameters

requestId

string

Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID.

Returns

Promise<ApiResponseType<GetMessageEventResponse>>

See

Get user interaction statistics Documentation


getNumberOfFollowers()

getNumberOfFollowers(date?): Promise<GetNumberOfFollowersResponse>

Defined in: lib/insight/api/insightClient.ts:135

Returns the number of users who have added the LINE Official Account on or before a specified date.

Parameters

date?

string

Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns

Promise<GetNumberOfFollowersResponse>

See

Get number of followers Documentation


getNumberOfFollowersWithHttpInfo()

getNumberOfFollowersWithHttpInfo(date?): Promise<ApiResponseType<GetNumberOfFollowersResponse>>

Defined in: lib/insight/api/insightClient.ts:149

Returns the number of users who have added the LINE Official Account on or before a specified date. . This method includes HttpInfo object to return additional information.

Parameters

date?

string

Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns

Promise<ApiResponseType<GetNumberOfFollowersResponse>>

See

Get number of followers Documentation


getNumberOfMessageDeliveries()

getNumberOfMessageDeliveries(date): Promise<GetNumberOfMessageDeliveriesResponse>

Defined in: lib/insight/api/insightClient.ts:176

Returns the number of messages sent from LINE Official Account on a specified day.

Parameters

date

string

Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9

Returns

Promise<GetNumberOfMessageDeliveriesResponse>

See

Get number of message deliveries Documentation


getNumberOfMessageDeliveriesWithHttpInfo()

getNumberOfMessageDeliveriesWithHttpInfo(date): Promise<ApiResponseType<GetNumberOfMessageDeliveriesResponse>>

Defined in: lib/insight/api/insightClient.ts:190

Returns the number of messages sent from LINE Official Account on a specified day. . This method includes HttpInfo object to return additional information.

Parameters

date

string

Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9

Returns

Promise<ApiResponseType<GetNumberOfMessageDeliveriesResponse>>

See

Get number of message deliveries Documentation


getStatisticsPerUnit()

getStatisticsPerUnit(customAggregationUnit, from, to): Promise<GetStatisticsPerUnitResponse>

Defined in: lib/insight/api/insightClient.ts:218

You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account.

Parameters

customAggregationUnit

string

Name of aggregation unit specified when sending the message. Case-sensitive. For example, Promotion_a and Promotion_A are regarded as different unit names.

from

string

Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9

to

string

End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9

Returns

Promise<GetStatisticsPerUnitResponse>

See

Documentation


getStatisticsPerUnitWithHttpInfo()

getStatisticsPerUnitWithHttpInfo(customAggregationUnit, from, to): Promise<ApiResponseType<GetStatisticsPerUnitResponse>>

Defined in: lib/insight/api/insightClient.ts:241

You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account. . This method includes HttpInfo object to return additional information.

Parameters

customAggregationUnit

string

Name of aggregation unit specified when sending the message. Case-sensitive. For example, Promotion_a and Promotion_A are regarded as different unit names.

from

string

Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9

to

string

End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9

Returns

Promise<ApiResponseType<GetStatisticsPerUnitResponse>>

See

Documentation