Skip to content

@line/bot-sdkDocs


@line/bot-sdk / Client

Class: Client

Deprecated

Use clients generated by openapi spec instead.

Constructors

new Client()

new Client(config): Client

Parameters

config: ClientConfig

Returns

Client

Defined in

lib/client.ts:27

Properties

config

config: ClientConfig

Defined in

lib/client.ts:22

Methods

broadcast()

broadcast(messages, notificationDisabled): Promise<MessageAPIResponseBase>

Parameters

messages: Message | Message[]

notificationDisabled: boolean = false

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:137


changeAudienceGroupAuthorityLevel()

changeAudienceGroupAuthorityLevel(authorityLevel): Promise<object>

Parameters

authorityLevel: AudienceGroupAuthorityLevel

Returns

Promise<object>

Defined in

lib/client.ts:787


createClickAudienceGroup()

createClickAudienceGroup(clickAudienceGroup): Promise<object & object>

Parameters

clickAudienceGroup

clickAudienceGroup.clickUrl?: string

clickAudienceGroup.description: string

clickAudienceGroup.requestId: string

Returns

Promise<object & object>

Defined in

lib/client.ts:694


createImpAudienceGroup()

createImpAudienceGroup(impAudienceGroup): Promise<object & object>

Parameters

impAudienceGroup

impAudienceGroup.description: string

impAudienceGroup.requestId: string

Returns

Promise<object & object>

Defined in

lib/client.ts:711


createRichMenu()

createRichMenu(richMenu): Promise<string>

Parameters

richMenu: RichMenu

Returns

Promise<string>

Defined in

lib/client.ts:367


createRichMenuAlias()

createRichMenuAlias(richMenuId, richMenuAliasId): Promise<object>

Parameters

richMenuId: string

richMenuAliasId: string

Returns

Promise<object>

Defined in

lib/client.ts:395


createUploadAudienceGroup()

createUploadAudienceGroup(uploadAudienceGroup): Promise<object>

Parameters

uploadAudienceGroup

uploadAudienceGroup.audiences?: object[]

uploadAudienceGroup.description: string

uploadAudienceGroup.isIfaAudience?: boolean

uploadAudienceGroup.uploadDescription?: string

Returns

Promise<object>

audienceGroupId

audienceGroupId: number

created

created: number

description

description: string

type

type: string

Defined in

lib/client.ts:620


createUploadAudienceGroupByFile()

createUploadAudienceGroupByFile(uploadAudienceGroup): Promise<object>

Parameters

uploadAudienceGroup

uploadAudienceGroup.description: string

uploadAudienceGroup.file: Readable | Buffer

uploadAudienceGroup.isIfaAudience?: boolean

uploadAudienceGroup.uploadDescription?: string

Returns

Promise<object>

audienceGroupId

audienceGroupId: number

created

created: number

description

description: string

type

type: "UPLOAD"

Defined in

lib/client.ts:637


deleteAudienceGroup()

deleteAudienceGroup(audienceGroupId): Promise<object>

Parameters

audienceGroupId: string

Returns

Promise<object>

Defined in

lib/client.ts:740


deleteDefaultRichMenu()

deleteDefaultRichMenu(): Promise<object>

Returns

Promise<object>

Defined in

lib/client.ts:505


deleteRichMenu()

deleteRichMenu(richMenuId): Promise<any>

Parameters

richMenuId: string

Returns

Promise<any>

Defined in

lib/client.ts:375


deleteRichMenuAlias()

deleteRichMenuAlias(richMenuAliasId): Promise<object>

Parameters

richMenuAliasId: string

Returns

Promise<object>

Defined in

lib/client.ts:409


getAudienceGroup()

getAudienceGroup(audienceGroupId): Promise<AudienceGroup>

Parameters

audienceGroupId: string

Returns

Promise<AudienceGroup>

Defined in

lib/client.ts:747


getAudienceGroupAuthorityLevel()

getAudienceGroupAuthorityLevel(): Promise<object>

Returns

Promise<object>

authorityLevel

authorityLevel: AudienceGroupAuthorityLevel

Defined in

lib/client.ts:780


getAudienceGroups()

getAudienceGroups(page, description?, status?, size?, createRoute?, includesExternalPublicGroups?): Promise<object>

Parameters

page: number

description?: string

status?: AudienceGroupStatus

size?: number

createRoute?: AudienceGroupCreateRoute

includesExternalPublicGroups?: boolean

Returns

Promise<object>

audienceGroups

audienceGroups: AudienceGroups

hasNextPage

hasNextPage: boolean

page

page: number

readWriteAudienceGroupTotalCount

readWriteAudienceGroupTotalCount: number

size

size: number

totalCount

totalCount: number

Defined in

lib/client.ts:754


getBotFollowersIds()

getBotFollowersIds(): Promise<string[]>

Returns

Promise<string[]>

Defined in

lib/client.ts:294


getBotInfo()

getBotInfo(): Promise<BotInfoResponse>

Returns

Promise<BotInfoResponse>

Defined in

lib/client.ts:797


getDefaultRichMenuId()

getDefaultRichMenuId(): Promise<string>

Returns

Promise<string>

Defined in

lib/client.ts:498


getFriendDemographics()

getFriendDemographics(): Promise<FriendDemographics>

Returns

Promise<FriendDemographics>

Defined in

lib/client.ts:593


getGroupMemberIds()

getGroupMemberIds(groupId): Promise<string[]>

Parameters

groupId: string

Returns

Promise<string[]>

Defined in

lib/client.ts:286


getGroupMemberProfile()

getGroupMemberProfile(groupId, userId): Promise<Profile>

Parameters

groupId: string

userId: string

Returns

Promise<Profile>

Defined in

lib/client.ts:252


getGroupMembersCount()

getGroupMembersCount(groupId): Promise<MembersCountResponse>

Parameters

groupId: string

Returns

Promise<MembersCountResponse>

Defined in

lib/client.ts:311


getGroupSummary()

getGroupSummary(groupId): Promise<GroupSummaryResponse>

Parameters

groupId: string

Returns

Promise<GroupSummaryResponse>

Defined in

lib/client.ts:329


getLinkToken()

getLinkToken(userId): Promise<string>

Parameters

userId: string

Returns

Promise<string>

Defined in

lib/client.ts:509


getMessageContent()

getMessageContent(messageId): Promise<Readable>

Parameters

messageId: string

Returns

Promise<Readable>

Defined in

lib/client.ts:338


getNarrowcastProgress()

getNarrowcastProgress(requestId): Promise<NarrowcastProgressResponse>

Parameters

requestId: string

Returns

Promise<NarrowcastProgressResponse>

Defined in

lib/client.ts:543


getNumberOfFollowers()

getNumberOfFollowers(date): Promise<NumberOfFollowersResponse>

Parameters

date: string

Returns

Promise<NumberOfFollowersResponse>

Defined in

lib/client.ts:584


getNumberOfMessageDeliveries()

getNumberOfMessageDeliveries(date): Promise<NumberOfMessageDeliveriesResponse>

Parameters

date: string

Returns

Promise<NumberOfMessageDeliveriesResponse>

Defined in

lib/client.ts:575


getNumberOfMessagesSentThisMonth()

getNumberOfMessagesSentThisMonth(): Promise<NumberOfMessagesSentThisMonth>

Returns

Promise<NumberOfMessagesSentThisMonth>

Defined in

lib/client.ts:559


getNumberOfSentBroadcastMessages()

getNumberOfSentBroadcastMessages(date): Promise<NumberOfMessagesSentResponse>

Parameters

date: string

Returns

Promise<NumberOfMessagesSentResponse>

Defined in

lib/client.ts:566


getNumberOfSentMulticastMessages()

getNumberOfSentMulticastMessages(date): Promise<NumberOfMessagesSentResponse>

Parameters

date: string

Returns

Promise<NumberOfMessagesSentResponse>

Defined in

lib/client.ts:534


getNumberOfSentPushMessages()

getNumberOfSentPushMessages(date): Promise<NumberOfMessagesSentResponse>

Parameters

date: string

Returns

Promise<NumberOfMessagesSentResponse>

Defined in

lib/client.ts:525


getNumberOfSentReplyMessages()

getNumberOfSentReplyMessages(date): Promise<NumberOfMessagesSentResponse>

Parameters

date: string

Returns

Promise<NumberOfMessagesSentResponse>

Defined in

lib/client.ts:516


getProfile()

getProfile(userId): Promise<Profile>

Parameters

userId: string

Returns

Promise<Profile>

Defined in

lib/client.ts:234


getRichMenu()

getRichMenu(richMenuId): Promise<RichMenuResponse>

Parameters

richMenuId: string

Returns

Promise<RichMenuResponse>

Defined in

lib/client.ts:358


getRichMenuAlias()

getRichMenuAlias(richMenuAliasId): Promise<GetRichMenuAliasResponse>

Parameters

richMenuAliasId: string

Returns

Promise<GetRichMenuAliasResponse>

Defined in

lib/client.ts:386


getRichMenuAliasList()

getRichMenuAliasList(): Promise<GetRichMenuAliasListResponse>

Returns

Promise<GetRichMenuAliasListResponse>

Defined in

lib/client.ts:379


getRichMenuIdOfUser()

getRichMenuIdOfUser(userId): Promise<string>

Parameters

userId: string

Returns

Promise<string>

Defined in

lib/client.ts:429


getRichMenuImage()

getRichMenuImage(richMenuId): Promise<Readable>

Parameters

richMenuId: string

Returns

Promise<Readable>

Defined in

lib/client.ts:467


getRichMenuList()

getRichMenuList(): Promise<RichMenuResponse[]>

Returns

Promise<RichMenuResponse[]>

Defined in

lib/client.ts:485


getRoomMemberIds()

getRoomMemberIds(roomId): Promise<string[]>

Parameters

roomId: string

Returns

Promise<string[]>

Defined in

lib/client.ts:290


getRoomMemberProfile()

getRoomMemberProfile(roomId, userId): Promise<Profile>

Parameters

roomId: string

userId: string

Returns

Promise<Profile>

Defined in

lib/client.ts:259


getRoomMembersCount()

getRoomMembersCount(roomId): Promise<MembersCountResponse>

Parameters

roomId: string

Returns

Promise<MembersCountResponse>

Defined in

lib/client.ts:320


getStatisticsPerUnit()

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

Parameters

customAggregationUnit: string

from: string

to: string

Returns

Promise<StatisticsPerUnit>

Defined in

lib/client.ts:609


getTargetLimitForAdditionalMessages()

getTargetLimitForAdditionalMessages(): Promise<TargetLimitForAdditionalMessages>

Returns

Promise<TargetLimitForAdditionalMessages>

Defined in

lib/client.ts:552


getUserInteractionStatistics()

getUserInteractionStatistics(requestId): Promise<UserInteractionStatistics>

Parameters

requestId: string

Returns

Promise<UserInteractionStatistics>

Defined in

lib/client.ts:600


getWebhookEndpointInfo()

getWebhookEndpointInfo(): Promise<WebhookEndpointInfoResponse>

Returns

Promise<WebhookEndpointInfoResponse>

Defined in

lib/client.ts:811


leaveGroup()

leaveGroup(groupId): Promise<any>

Parameters

groupId: string

Returns

Promise<any>

Defined in

lib/client.ts:350


leaveRoom()

leaveRoom(roomId): Promise<any>

Parameters

roomId: string

Returns

Promise<any>

Defined in

lib/client.ts:354


linkRichMenuToMultipleUsers()

linkRichMenuToMultipleUsers(richMenuId, userIds): Promise<any>

Parameters

richMenuId: string

userIds: string[]

Returns

Promise<any>

Defined in

lib/client.ts:449


linkRichMenuToUser()

linkRichMenuToUser(userId, richMenuId): Promise<any>

Parameters

userId: string

richMenuId: string

Returns

Promise<any>

Defined in

lib/client.ts:436


multicast()

multicast(to, messages, notificationDisabled, customAggregationUnits?): Promise<MessageAPIResponseBase>

Parameters

to: string[]

messages: Message | Message[]

notificationDisabled: boolean = false

customAggregationUnits?: string[]

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:99


narrowcast()

narrowcast(messages, recipient?, filter?, limit?, notificationDisabled?): Promise<MessageAPIResponseBase>

Parameters

messages: Message | Message[]

recipient?: ReceieptObject

filter?

filter.demographic?: DemographicFilterObject

limit?

limit.max?: number

limit.upToRemainingQuota?: boolean

notificationDisabled?: boolean

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:117


pushMessage()

pushMessage(to, messages, notificationDisabled, customAggregationUnits?): Promise<MessageAPIResponseBase>

Parameters

to: string

messages: Message | Message[]

notificationDisabled: boolean = false

customAggregationUnits?: string[]

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:69


replyMessage()

replyMessage(replyToken, messages, notificationDisabled): Promise<MessageAPIResponseBase>

Parameters

replyToken: string

messages: Message | Message[]

notificationDisabled: boolean = false

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:87


setDefaultRichMenu()

setDefaultRichMenu(richMenuId): Promise<object>

Parameters

richMenuId: string

Returns

Promise<object>

Defined in

lib/client.ts:492


setDescriptionAudienceGroup()

setDescriptionAudienceGroup(description, audienceGroupId): Promise<object>

Parameters

description: string

audienceGroupId: string

Returns

Promise<object>

Defined in

lib/client.ts:727


setRequestOptionOnce()

setRequestOptionOnce(option): void

Parameters

option: Partial<RequestOption>

Returns

void

Defined in

lib/client.ts:42


setRichMenuImage()

setRichMenuImage(richMenuId, data, contentType?): Promise<any>

Parameters

richMenuId: string

data: Readable | Buffer

contentType?: string

Returns

Promise<any>

Defined in

lib/client.ts:473


setWebhookEndpointUrl()

setWebhookEndpointUrl(endpoint): Promise<object>

Parameters

endpoint: string

Returns

Promise<object>

Defined in

lib/client.ts:804


testWebhookEndpoint()

testWebhookEndpoint(endpoint?): Promise<TestWebhookEndpointResponse>

Parameters

endpoint?: string

Returns

Promise<TestWebhookEndpointResponse>

Defined in

lib/client.ts:818


unlinkRichMenuFromUser()

unlinkRichMenuFromUser(userId): Promise<any>

Parameters

userId: string

Returns

Promise<any>

Defined in

lib/client.ts:445


unlinkRichMenusFromMultipleUsers()

unlinkRichMenusFromMultipleUsers(userIds): Promise<any>

Parameters

userIds: string[]

Returns

Promise<any>

Defined in

lib/client.ts:459


updateRichMenuAlias()

updateRichMenuAlias(richMenuAliasId, richMenuId): Promise<object>

Parameters

richMenuAliasId: string

richMenuId: string

Returns

Promise<object>

Defined in

lib/client.ts:416


updateUploadAudienceGroup()

updateUploadAudienceGroup(uploadAudienceGroup, httpConfig?): Promise<object>

Parameters

uploadAudienceGroup

uploadAudienceGroup.audienceGroupId: number

uploadAudienceGroup.audiences?: object[]

uploadAudienceGroup.description?: string

uploadAudienceGroup.uploadDescription?: string

httpConfig?: Partial<AxiosRequestConfig<any>>

Returns

Promise<object>

Defined in

lib/client.ts:654


updateUploadAudienceGroupByFile()

updateUploadAudienceGroupByFile(uploadAudienceGroup, httpConfig?): Promise<object>

Parameters

uploadAudienceGroup

uploadAudienceGroup.audienceGroupId: number

uploadAudienceGroup.file?: Readable | Buffer

uploadAudienceGroup.uploadDescription?: string

httpConfig?: Partial<AxiosRequestConfig<any>>

Returns

Promise<object>

Defined in

lib/client.ts:674


validateBroadcastMessageObjects()

validateBroadcastMessageObjects(messages): Promise<MessageAPIResponseBase>

Parameters

messages: Message | Message[]

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:195


validateCustomAggregationUnits()

validateCustomAggregationUnits(units): object

Parameters

units: string[]

Returns

object

messages

messages: string[]

valid

valid: boolean

Defined in

lib/client.ts:207


validateMulticastMessageObjects()

validateMulticastMessageObjects(messages): Promise<MessageAPIResponseBase>

Parameters

messages: Message | Message[]

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:171


validateNarrowcastMessageObjects()

validateNarrowcastMessageObjects(messages): Promise<MessageAPIResponseBase>

Parameters

messages: Message | Message[]

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:183


validatePushMessageObjects()

validatePushMessageObjects(messages): Promise<MessageAPIResponseBase>

Parameters

messages: Message | Message[]

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:151


validateReplyMessageObjects()

validateReplyMessageObjects(messages): Promise<MessageAPIResponseBase>

Parameters

messages: Message | Message[]

Returns

Promise<MessageAPIResponseBase>

Defined in

lib/client.ts:163


validateRichMenu()

validateRichMenu(richMenu): Promise<object>

Parameters

richMenu: RichMenu

Returns

Promise<object>

Defined in

lib/client.ts:826