Skip to content

@line/bot-sdk / Exports / webhook

Namespace: webhook

Table of contents

Namespaces

Type Aliases

Type Aliases

AccountLinkEvent

Ƭ AccountLinkEvent: EventBase & { link: LinkContent ; replyToken?: string ; type: "accountLink" }

Defined in

lib/webhook/model/accountLinkEvent.ts:24

lib/webhook/model/accountLinkEvent.ts:35


ActionResult

Ƭ ActionResult: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameTypeDescription
data?stringBase64-encoded binary data
typeTypeEnum

Defined in

lib/webhook/model/actionResult.ts:13

lib/webhook/model/actionResult.ts:23


ActivatedEvent

Ƭ ActivatedEvent: EventBase & { chatControl: ChatControl ; type: "activated" }

Defined in

lib/webhook/model/activatedEvent.ts:24

lib/webhook/model/activatedEvent.ts:31


AllMentionee

Ƭ AllMentionee: MentioneeBase & { type: "all" }

Defined in

lib/webhook/model/allMentionee.ts:20


AttachedModuleContent

Ƭ AttachedModuleContent: ModuleContentBase & { botId: string ; scopes: string[] ; type: "attached" }

Defined in

lib/webhook/model/attachedModuleContent.ts:17


AudioMessageContent

Ƭ AudioMessageContent: MessageContentBase & { contentProvider: ContentProvider ; duration?: number ; type: "audio" }

Defined in

lib/webhook/model/audioMessageContent.ts:18


BeaconContent

Ƭ BeaconContent: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameTypeDescription
dm?stringDevice message of beacon that was detected.
hwidstringHardware ID of the beacon that was detected
typeTypeEnumType of beacon event.

Defined in

lib/webhook/model/beaconContent.ts:13

lib/webhook/model/beaconContent.ts:28


BeaconEvent

Ƭ BeaconEvent: EventBase & { beacon: BeaconContent ; replyToken: string ; type: "beacon" }

Defined in

lib/webhook/model/beaconEvent.ts:24

lib/webhook/model/beaconEvent.ts:35


BotResumedEvent

Ƭ BotResumedEvent: EventBase & { type: "botResumed" }

Defined in

lib/webhook/model/botResumedEvent.ts:23

lib/webhook/model/botResumedEvent.ts:27


BotSuspendedEvent

Ƭ BotSuspendedEvent: EventBase & { type: "botSuspended" }

Defined in

lib/webhook/model/botSuspendedEvent.ts:23

lib/webhook/model/botSuspendedEvent.ts:27


CallbackRequest

Ƭ CallbackRequest: Object

The request body contains a JSON object with the user ID of a bot that should receive webhook events and an array of webhook event objects.

Type declaration

NameTypeDescription
destinationstringUser ID of a bot that should receive webhook events. The user ID value is a string that matches the regular expression, U[0-9a-f]{32}. See destination Documentation
eventsEvent[]Array of webhook event objects. The LINE Platform may send an empty array that doesn't include a webhook event object to confirm communication. See events Documentation

Defined in

lib/webhook/model/callbackRequest.ts:18


ChatControl

Ƭ ChatControl: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameType
expireAtnumber

Defined in

lib/webhook/model/chatControl.ts:13


ContentProvider

Ƭ ContentProvider: Object

Provider of the media file.

Type declaration

NameTypeDescription
originalContentUrl?stringURL of the image file. Only included when contentProvider.type is external.
previewImageUrl?stringURL of the preview image. Only included when contentProvider.type is external.
typeTypeEnumProvider of the image file.

Defined in

lib/webhook/model/contentProvider.ts:16

lib/webhook/model/contentProvider.ts:31


DeactivatedEvent

Ƭ DeactivatedEvent: EventBase & { type: "deactivated" }

Defined in

lib/webhook/model/deactivatedEvent.ts:23

lib/webhook/model/deactivatedEvent.ts:27


DeliveryContext

Ƭ DeliveryContext: Object

webhook's delivery context information

Type declaration

NameTypeDescription
isRedeliverybooleanWhether the webhook event is a redelivered one or not.

Defined in

lib/webhook/model/deliveryContext.ts:16


DetachedModuleContent

Ƭ DetachedModuleContent: ModuleContentBase & { botId: string ; reason: ReasonEnum ; type: "detached" }

Defined in

lib/webhook/model/detachedModuleContent.ts:17

lib/webhook/model/detachedModuleContent.ts:29


Emoji

Ƭ Emoji: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameTypeDescription
emojiIdstringID for a LINE emoji inside a set.
indexnumberIndex position for a character in text, with the first character being at position 0.
lengthnumberThe length of the LINE emoji string. For LINE emoji (hello), 7 is the length.
productIdstringProduct ID for a LINE emoji set.

Defined in

lib/webhook/model/emoji.ts:13


Event

Ƭ Event: AccountLinkEvent | ActivatedEvent | BeaconEvent | BotResumedEvent | BotSuspendedEvent | DeactivatedEvent | PnpDeliveryCompletionEvent | FollowEvent | JoinEvent | LeaveEvent | MemberJoinedEvent | MemberLeftEvent | MessageEvent | ModuleEvent | PostbackEvent | ThingsEvent | UnfollowEvent | UnsendEvent | VideoPlayCompleteEvent

Defined in

lib/webhook/model/event.ts:37

lib/webhook/model/event.ts:85


EventBase

Ƭ EventBase: Object

Webhook event

Type declaration

NameTypeDescription
deliveryContextDeliveryContext
modeEventMode
source?Source
timestampnumberTime of the event in milliseconds.
typestringType of the event
webhookEventIdstringWebhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.

Defined in

lib/webhook/model/event.ts:61


EventMode

Ƭ EventMode: "active" | "standby"

Channel state.

Defined in

lib/webhook/model/eventMode.ts:17


FileMessageContent

Ƭ FileMessageContent: MessageContentBase & { fileName: string ; fileSize: number ; type: "file" }

Defined in

lib/webhook/model/fileMessageContent.ts:17


FollowDetail

Ƭ FollowDetail: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameTypeDescription
isUnblockedbooleanWhether a user has added your LINE Official Account as a friend or unblocked.

Defined in

lib/webhook/model/followDetail.ts:13


FollowEvent

Ƭ FollowEvent: EventBase & { follow: FollowDetail ; replyToken: string ; type: "follow" }

Defined in

lib/webhook/model/followEvent.ts:24

lib/webhook/model/followEvent.ts:35


GroupSource

Ƭ GroupSource: SourceBase & { groupId: string ; type: "group" ; userId?: string }

Defined in

lib/webhook/model/groupSource.ts:17


ImageMessageContent

Ƭ ImageMessageContent: MessageContentBase & { contentProvider: ContentProvider ; imageSet?: ImageSet ; quoteToken: string ; type: "image" }

Defined in

lib/webhook/model/imageMessageContent.ts:19


ImageSet

Ƭ ImageSet: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameTypeDescription
idstringImage set ID. Only included when multiple images are sent simultaneously.
index?numberAn index starting from 1, indicating the image number in a set of images sent simultaneously. Only included when multiple images are sent simultaneously. However, it won't be included if the sender is using LINE 11.15 or earlier for Android.
total?numberThe total number of images sent simultaneously.

Defined in

lib/webhook/model/imageSet.ts:13


JoinEvent

Ƭ JoinEvent: EventBase & { replyToken: string ; type: "join" }

Defined in

lib/webhook/model/joinEvent.ts:23

lib/webhook/model/joinEvent.ts:31


JoinedMembers

Ƭ JoinedMembers: Object

Type declaration

NameTypeDescription
membersUserSource[]Users who joined. Array of source user objects.

Defined in

lib/webhook/model/joinedMembers.ts:15


LeaveEvent

Ƭ LeaveEvent: EventBase & { type: "leave" }

Defined in

lib/webhook/model/leaveEvent.ts:23

lib/webhook/model/leaveEvent.ts:27


LeftMembers

Ƭ LeftMembers: Object

Type declaration

NameTypeDescription
membersUserSource[]Users who left. Array of source user objects.

Defined in

lib/webhook/model/leftMembers.ts:15


LinkContent

Ƭ LinkContent: Object

Content of the account link event.

Type declaration

NameTypeDescription
noncestringSpecified nonce (number used once) when verifying the user ID.
resultResultEnumOne of the following values to indicate whether linking the account was successful or not

Defined in

lib/webhook/model/linkContent.ts:16

lib/webhook/model/linkContent.ts:27


LinkThingsContent

Ƭ LinkThingsContent: ThingsContentBase & { deviceId: string ; type: "link" }

Defined in

lib/webhook/model/linkThingsContent.ts:17


LocationMessageContent

Ƭ LocationMessageContent: MessageContentBase & { address?: string ; latitude: number ; longitude: number ; title?: string ; type: "location" }

Defined in

lib/webhook/model/locationMessageContent.ts:17


MemberJoinedEvent

Ƭ MemberJoinedEvent: EventBase & { joined: JoinedMembers ; replyToken: string ; type: "memberJoined" }

Defined in

lib/webhook/model/memberJoinedEvent.ts:24

lib/webhook/model/memberJoinedEvent.ts:35


MemberLeftEvent

Ƭ MemberLeftEvent: EventBase & { left: LeftMembers ; type: "memberLeft" }

Defined in

lib/webhook/model/memberLeftEvent.ts:24

lib/webhook/model/memberLeftEvent.ts:31


Mention

Ƭ Mention: Object

Type declaration

NameTypeDescription
mentioneesMentionee[]Array of one or more mention objects. Max: 20 mentions

Defined in

lib/webhook/model/mention.ts:15


Mentionee

Ƭ Mentionee: AllMentionee | UserMentionee

Defined in

lib/webhook/model/mentionee.ts:16


MentioneeBase

Ƭ MentioneeBase: Object

Type declaration

NameTypeDescription
indexnumberIndex position of the user mention for a character in text, with the first character being at position 0. See index Documentation
lengthnumberThe length of the text of the mentioned user. For a mention @example, 8 is the length. See length Documentation
typestringMentioned target. See type Documentation

Defined in

lib/webhook/model/mentionee.ts:20


MessageContent

Ƭ MessageContent: AudioMessageContent | FileMessageContent | ImageMessageContent | LocationMessageContent | StickerMessageContent | TextMessageContent | VideoMessageContent

Defined in

lib/webhook/model/messageContent.ts:21


MessageContentBase

Ƭ MessageContentBase: Object

Type declaration

NameTypeDescription
idstringMessage ID See id Documentation
typestringType See type Documentation

Defined in

lib/webhook/model/messageContent.ts:30


MessageEvent

Ƭ MessageEvent: EventBase & { message: MessageContent ; replyToken?: string ; type: "message" }

Defined in

lib/webhook/model/messageEvent.ts:24

lib/webhook/model/messageEvent.ts:34


ModuleContent

Ƭ ModuleContent: AttachedModuleContent | DetachedModuleContent

Defined in

lib/webhook/model/moduleContent.ts:16


ModuleContentBase

Ƭ ModuleContentBase: Object

Type declaration

NameTypeDescription
typestringType

Defined in

lib/webhook/model/moduleContent.ts:20


ModuleEvent

Ƭ ModuleEvent: EventBase & { module: ModuleContent ; type: "module" }

Defined in

lib/webhook/model/moduleEvent.ts:24

lib/webhook/model/moduleEvent.ts:31


PnpDelivery

Ƭ PnpDelivery: Object

A delivery object containing a hashed phone number string or a string specified by X-Line-Delivery-Tag header

Type declaration

NameTypeDescription
datastringA hashed phone number string or a string specified by X-Line-Delivery-Tag header

Defined in

lib/webhook/model/pnpDelivery.ts:16


PnpDeliveryCompletionEvent

Ƭ PnpDeliveryCompletionEvent: EventBase & { delivery: PnpDelivery ; type: "delivery" }

Defined in

lib/webhook/model/pnpDeliveryCompletionEvent.ts:24

lib/webhook/model/pnpDeliveryCompletionEvent.ts:31


PostbackContent

Ƭ PostbackContent: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameTypeDescription
datastringPostback data
params?{ [key: string]: string; }

Defined in

lib/webhook/model/postbackContent.ts:13


PostbackEvent

Ƭ PostbackEvent: EventBase & { postback: PostbackContent ; replyToken?: string ; type: "postback" }

Defined in

lib/webhook/model/postbackEvent.ts:24

lib/webhook/model/postbackEvent.ts:35


RoomSource

Ƭ RoomSource: SourceBase & { roomId: string ; type: "room" ; userId?: string }

Defined in

lib/webhook/model/roomSource.ts:17


ScenarioResult

Ƭ ScenarioResult: Object

Type declaration

NameTypeDescription
actionResults?ActionResult[]Execution result of individual operations specified in action. Only included when things.result.resultCode is success. See actionResults Documentation
bleNotificationPayload?stringData contained in notification. See bleNotificationPayload Documentation
endTimenumberTimestamp for when execution of scenario was completed (milliseconds, LINE app time) See endTime Documentation
errorReason?stringError reason. See errorReason Documentation
resultCodestringScenario execution completion status See resultCode Documentation
revision?numberRevision number of the scenario set containing the executed scenario See revision Documentation
scenarioId?stringScenario ID executed See scenarioId Documentation
startTimenumberTimestamp for when execution of scenario action started (milliseconds, LINE app time) See startTime Documentation

Defined in

lib/webhook/model/scenarioResult.ts:15


ScenarioResultThingsContent

Ƭ ScenarioResultThingsContent: ThingsContentBase & { deviceId: string ; result: ScenarioResult ; type: "scenarioResult" }

Defined in

lib/webhook/model/scenarioResultThingsContent.ts:18


Source

Ƭ Source: GroupSource | RoomSource | UserSource

Defined in

lib/webhook/model/source.ts:17


SourceBase

Ƭ SourceBase: Object

the source of the event.

Type declaration

NameTypeDescription
type?stringsource type See type Documentation

Defined in

lib/webhook/model/source.ts:25


StickerMessageContent

Ƭ StickerMessageContent: MessageContentBase & { keywords?: string[] ; packageId: string ; quoteToken: string ; quotedMessageId?: string ; stickerId: string ; stickerResourceType: StickerResourceTypeEnum ; text?: string ; type: "sticker" }

Defined in

lib/webhook/model/stickerMessageContent.ts:17

lib/webhook/model/stickerMessageContent.ts:62


TextMessageContent

Ƭ TextMessageContent: MessageContentBase & { emojis?: Emoji[] ; mention?: Mention ; quoteToken: string ; quotedMessageId?: string ; text: string ; type: "text" }

Defined in

lib/webhook/model/textMessageContent.ts:19


ThingsContent

Ƭ ThingsContent: LinkThingsContent | ScenarioResultThingsContent | UnlinkThingsContent

Defined in

lib/webhook/model/thingsContent.ts:17


ThingsContentBase

Ƭ ThingsContentBase: Object

Type declaration

NameTypeDescription
typestringType

Defined in

lib/webhook/model/thingsContent.ts:22


ThingsEvent

Ƭ ThingsEvent: EventBase & { replyToken: string ; things: ThingsContent ; type: "things" }

Defined in

lib/webhook/model/thingsEvent.ts:24

lib/webhook/model/thingsEvent.ts:35


UnfollowEvent

Ƭ UnfollowEvent: EventBase & { type: "unfollow" }

Defined in

lib/webhook/model/unfollowEvent.ts:23

lib/webhook/model/unfollowEvent.ts:27


UnlinkThingsContent

Ƭ UnlinkThingsContent: ThingsContentBase & { deviceId: string ; type: "unlink" }

Defined in

lib/webhook/model/unlinkThingsContent.ts:17


UnsendDetail

Ƭ UnsendDetail: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameTypeDescription
messageIdstringThe message ID of the unsent message

Defined in

lib/webhook/model/unsendDetail.ts:13


UnsendEvent

Ƭ UnsendEvent: EventBase & { type: "unsend" ; unsend: UnsendDetail }

Defined in

lib/webhook/model/unsendEvent.ts:24

lib/webhook/model/unsendEvent.ts:31


UserMentionee

Ƭ UserMentionee: MentioneeBase & { type: "user" ; userId?: string }

Defined in

lib/webhook/model/userMentionee.ts:20


UserSource

Ƭ UserSource: SourceBase & { type: "user" ; userId?: string }

Defined in

lib/webhook/model/userSource.ts:17


VideoMessageContent

Ƭ VideoMessageContent: MessageContentBase & { contentProvider: ContentProvider ; duration?: number ; quoteToken: string ; type: "video" }

Defined in

lib/webhook/model/videoMessageContent.ts:18


VideoPlayComplete

Ƭ VideoPlayComplete: Object

Webhook Type Definition Webhook event definition of the LINE Messaging API

The version of the OpenAPI document: 1.0.0

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). https://openapi-generator.tech Do not edit the class manually.

Type declaration

NameTypeDescription
trackingIdstringID used to identify a video. Returns the same value as the trackingId assigned to the video message.

Defined in

lib/webhook/model/videoPlayComplete.ts:13


VideoPlayCompleteEvent

Ƭ VideoPlayCompleteEvent: EventBase & { replyToken: string ; type: "videoPlayComplete" ; videoPlayComplete: VideoPlayComplete }

Defined in

lib/webhook/model/videoPlayCompleteEvent.ts:24

lib/webhook/model/videoPlayCompleteEvent.ts:35