Constructor of LineClient
Usage:
new LineClient({
accessToken: ACCESS_TOKEN,
})
The access token used by the client
The underlying axios instance.
The channel secret used by the client
The underlying axios instance for api-data.line.me APIs.
Broadcast Message
Sends push messages to multiple users at any time.
Messages to send (Max: 5)
Returns status code 200
and an empty JSON object.
Broadcast Message
Sends push messages to multiple users at any time.
Returns status code 200
and an empty JSON object.
Change the authority level of all audiences created in the same channel.
PUBLIC
will be available in channels other than the one where you created the audience. For example, it will be available in LINE Official Account Manager, LINE Ad Manager, and all channels the bot is linked to.PRIVATE
will be available only in the channel where you created the audience.The authority level for all audiences linked to a channel
PUBLIC
: The default authority level. Audiences will be available in channels other than the one where you created the audience. For example, it will be available in LINE Official Account Manager, LINE Ad Manager, and all channels the bot is linked to.PRIVATE
: Audiences will be available only in the channel where you created the audience.Returns the HTTP 200
status code.
Create Click Audience Group
Creates an audience for click-based retargeting. You can create up to 1,000 audiences.
A click-based retargeting audience is a collection of users who have clicked a URL contained in a broadcast or narrowcast message.
Use a request ID to identify the message. The message is sent to any user who has clicked at least one link.
The audience's name. Audience names must be unique. This is case-insensitive, meaning AUDIENCE
and audience
are considered identical.
The request ID of a broadcast or narrowcast message sent in the past 60 days. Each Messaging API request has a request ID.
create click audience group options
Returns a ClickAudienceGroup along with the 202
HTTP status code.
Create Impression-based Audience Group
Creates an audience for impression-based retargeting. You can create up to 1,000 audiences.
An impression-based retargeting audience is a collection of users who have viewed a broadcast or narrowcast message.
Use a request ID to specify the message. The audience will include any user who has viewed at least one message bubble.
The audience's name. Audience names must be unique. This is case-insensitive, meaning AUDIENCE
and audience
are considered identical.
The request ID of a broadcast or narrowcast message sent in the past 60 days. Each Messaging API request has a request ID.
Returns an ImpAudienceGroup along with the 202
HTTP status code.
Create LIFF App (LIFF v1)
Adds the LIFF app to a channel. You can add up to 30 LIFF apps on one channel.
LIFF app settings
Returns status code 200
and a JSON object with the following properties.
liffId:
Create Rich Menu
Creates a rich menu.
You must upload a rich menu image, and set the rich menu as the default rich menu or link the rich menu to a user for the rich menu to be displayed. You can create up to 1000 rich menus for one LINE Official Account with the Messaging API.
The rich menu represented as a rich menu object.
Returns status code 200
and a JSON object with the rich menu ID.
Create Upload Audience Group
Creates an audience for uploading user IDs. You can create up to 1,000 audiences.
Get user IDs via these methods:
source
property of a webhook event object.【You must complete additional application forms to specify recipients using Identifiers for Advertisers (IFAs)】
You must complete some additional application forms before you can use IFAs to specify recipients. For more information, contact your LINE representative or submit an inquiry through the LINE for Business website.
The audience's name. Audience names must be unique. Note that comparisons are case-insensitive, so the names AUDIENCE
and audience
are considered identical.
If this is false
(default), recipients are specified by user IDs. If true
, recipients must be specified by IFAs.
An array of up to 10,000 user IDs or IFAs.
Create upload audience group options.
Returns an UploadAudienceGroup along with the 202
HTTP status code.
Deletes Audience Group
Deletes an audience.
You can't undo deleting an audience
Make sure that an audience is no longer in use before you delete it.
The audience ID.
Returns the 200
HTTP status code.
Delete Default Rich Menu
Cancels the default rich menu set with the Messaging API.
Returns status code 200
and a JSON object with the rich menu ID.
Delete LIFF App (LIFF v1)
Deletes a LIFF app from a channel.
ID of the LIFF app to be deleted
Status code 200
is returned.
Delete Rich Menu
Deletes a rich menu.
If you have reached the maximum of 1,000 rich menus with the Messaging API for your LINE Official Account, you must delete a rich menu before you can create a new one.
ID of a rich menu
Returns status code 200
and an empty JSON object.
Download Rich Menu Image
Downloads an image associated with a rich menu.
ID of the rich menu with the image to be downloaded
Returns status code 200
and the binary data of the rich menu image. The image can be downloaded as shown in the example request.
Get All Member Ids in the Group
Gets the user IDs of the members of a group that the bot is in. This includes the user IDs of users who have not added the LINE Official Account as a friend or has blocked the LINE Official Account.
This feature is available only to verified or premium accounts. For more information about account types, see the LINE Account Connect page on the LINE for Business website.
Group ID. Found in the source
object of webhook event objects.
Returns status code 200
and a JSON object with the following information.
memberIds:
memberIds
. For more information, see User consent.Get All Member Ids in the Room
Gets the user IDs of the members of a room that the LINE Official Account is in. This includes the user IDs of users who have not added the LINE Official Account as a friend or have blocked the LINE Official Account.
This feature is available only to verified or premium accounts. For more information about account types, see the LINE Account Connect page on the LINE for Business website.
Room ID. Found in the source
object of webhook event objects.
Returns status code 200
and a JSON object with the following information.
memberIds:
memberIds
. For more information, see User consent.Get Audience Group
Gets audience data.
The audience ID.
Returns a 200
HTTP status code and an AudienceGroupWithJob.
Get Audience Group Authority Level
Get the authority level of the audience
Returns status code 200
and an AudienceGroupAuthorityLevel.
Get Audience Groups
Gets data for more than one audience.
get audience groups options
Returns a 200
HTTP status code and an AudienceGroups.
Gets a bot's basic information.
Returns status code 200 and a JSON object with the bot information.
Get Default Rich Menu
Gets the ID of the default rich menu set with the Messaging API.
Returns status code 200
and a JSON object with the rich menu ID.
Get Friend Demographics
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) and Taiwan (TW).
【LINE Official Account migration】
You can't call this API with a LINE@ account or LINE Official Account that hasn't been migrated to the account plans implemented on April 18, 2019. Please migrate your account first. For more information, see Migration of LINE@ accounts.
Not real-time data
It can take up to 3 days for demographic information to be calculated. This means the information the API returns may be 3 days old. Furthermore, your "Target reach" number must be at least 20 to retrieve demographic information.
Returns status code 200
and a FriendDemographics.
Get Group Member Ids
Gets the user IDs of the members of a group that the bot is in. This includes the user IDs of users who have not added the LINE Official Account as a friend or has blocked the LINE Official Account.
This feature is available only to verified or premium accounts. For more information about account types, see the LINE Account Connect page on the LINE for Business website.
Group ID. Found in the source
object of webhook event objects.
Value of the continuation token found in the next
property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.
Returns status code 200
and a JSON object with the following information.
memberIds:
memberIds
. For more information, see User consent.next:
memberIds
in the original request.Get Group Member Profile
Gets the user profile of a member of a group that the LINE Official Account is in if the user ID of the group member is known. You can get user profiles of users who have not added the LINE Official Account as a friend or have blocked the LINE Official Account.
Group ID. Found in the source
object of webhook event objects.
User ID. Found in the source
object of webhook event objects. Do not use the LINE ID used in LINE.
Returns status code 200
and a JSON object with the following information.
displayName:
userId:
pictureUrl:
Get Members In Group Count
Gets the count of members in a group. You can get the member in group count even if the user hasn't added the LINE Official Account as a friend or has blocked the LINE Official Account.
Group ID. Found in the source
object of webhook event objects.
Returns status code 200
and a number representing group member count.
count:
Get Group Summary
Gets the group ID, group name, and group icon URL of a group where the LINE Official Account is a member.
Group ID. Found in the source
object of webhook event objects.
Returns status code 200
and a JSON object with the following information.
groupId:
groupName:
pictureUrl:
Get LIFF App List (LIFF v1)
Gets information on all the LIFF apps registered in the channel.
Returns status code 200
and a JSON object with the following properties.
Get Account link
Issues a link token used for the account link feature.
User ID for the LINE account to be linked. Found in the source
object of account link event objects. Do not use the LINE ID used in LINE.
Returns status code 200
and a link token. Link tokens are valid for 10 minutes and can only be used once.
Note: The validity period may change without notice.
Get Linked Rich Menu
Gets the ID of the rich menu linked to a user.
User ID. Found in the source
object of webhook event objects. Do not use the LINE ID used in LINE.
Returns status code 200
and a JSON object with the rich menu ID.
Get Message Content
Gets images, videos, audio, and files sent by users.
【No API for retrieving text】
You can't use the Messaging API to retrieve text sent by users.
Message ID
Returns status code 200
and the content in binary.
Content is automatically deleted after a certain period from when the message was sent. There is no guarantee for how long content is stored.
Get Narrowcast Message Status
Gets the status of a narrowcast message.
【LINE Official Account migration】
You can't call this API with a LINE@ account or LINE Official Account that hasn't been migrated to the account plans implemented on April 18, 2019. Please migrate your account first. For more information, see Migration of LINE@ accounts.
【Messages must have a minimum number of recipients】
Narrowcast messages cannot be sent when the number of recipients is below a certain minimum amount, to prevent someone from guessing the recipients' attributes. The minimum number of recipients is a private value defined by the LINE Platform.
【Window of availability for status requests】
You can get the status of a narrowcast message for up to 7 days after you have requested that it be sent.
The narrowcast message's request ID. Each Messaging API request has a request ID.
Returns a 200
HTTP status code and a NarrowcastProgressResponse
Get Number of Followers
Returns the number of users who have added the LINE Official Account on or before a specified date.
【LINE Official Account migration】
You can't call this API with a LINE@ account or LINE Official Account that hasn't been migrated to the account plans implemented on April 18, 2019. Please migrate your account first. For more information, see Migration of LINE@ accounts.
Date for which to retrieve the number of followers.
Returns status code 200
and a NumberOfFollowersResponse.
Get Number of Delivery Messages
Returns the number of messages sent from LINE Official Account on a specified day.
【LINE Official Account migration】
You can't call this API with a LINE@ account or LINE Official Account that hasn't been migrated to the account plans implemented on April 18, 2019. Please migrate your account first. For more information, see Migration of LINE@ accounts.
Date for which to retrieve number of sent messages.
Returns status code 200
and a NumberOfMessageDeliveriesResponse.
Get Number of Messages Sent This Month
Gets the number of messages sent in the current month.
The number of messages retrieved by this operation includes the number of messages sent from LINE Official Account Manager.
The number of messages retrieved by this operation is approximate. To get the correct number of sent messages, use LINE Official Account Manager or execute API operations for getting the number of sent messages.
Note: LINE@ accounts cannot call this API endpoint.
Returns status code 200
and a NumberOfMessagesSentThisMonth.
Get Number of Sent Broadcast Messages
Gets the number of messages sent with the /bot/message/broadcast
endpoint.
The number of messages retrieved by this operation does not include the number of messages sent from LINE Official Account Manager.
【LINE Official Account migration】
You can't call this API with a LINE@ account or LINE Official Account that hasn't been migrated to the account plans implemented on April 18, 2019. Please migrate your account first. For more information, see Migration of LINE@ accounts.
Date the messages were sent
Returns status code 200
and a NumberOfMessagesSentResponse.
Get Number of Sent Multicast Messages
Gets the number of messages sent with the /bot/message/multicast
endpoint.
The number of messages retrieved by this operation does not include the number of messages sent from LINE Official Account Manager.
Note: LINE@ accounts under the free or basic plan cannot call this API endpoint.
Date the messages were sent
Returns status code 200
and a NumberOfMessagesSentResponse.
Get Number of Sent Push Messages
Gets the number of messages sent with the /bot/message/push
endpoint.
The number of messages retrieved by this operation does not include the number of messages sent from LINE Official Account Manager.
Note: LINE@ accounts under the free or basic plan cannot call this API endpoint.
Date the messages were sent
Returns status code 200
and a NumberOfMessagesSentResponse.
Get Number of Sent Reply Messages
Gets the number of messages sent with the /bot/message/reply
endpoint.
The number of messages retrieved by this operation does not include the number of messages sent from LINE Official Account Manager.
Date the messages were sent
Returns status code 200
and a NumberOfMessagesSentResponse.
Get Rich Menu
Gets a rich menu via a rich menu ID.
ID of a rich menu
Returns status code 200
and a rich menu response objects.
richmenus: Array of rich menu response objects
Get Rich Menu List
Gets a list of the rich menu response object of all rich menus created by Create a rich menu.
You can't retrieve rich menus created with LINE Official Account Manager.
Returns status code 200
and a list of rich menu response objects.
richmenus: Array of rich menu response objects
Get Room Member Ids
Gets the user IDs of the members of a room that the LINE Official Account is in. This includes the user IDs of users who have not added the LINE Official Account as a friend or have blocked the LINE Official Account.
This feature is available only to verified or premium accounts. For more information about account types, see the LINE Account Connect page on the LINE for Business website.
Room ID. Found in the source
object of webhook event objects.
Value of the continuation token found in the next
property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.
Returns status code 200
and a JSON object with the following information.
memberIds:
memberIds
. For more information, see User consent.next:
memberIds
in the original request.Get Room Member Profile
Gets the user profile of a member of a room that the LINE Official Account is in if the user ID of the room member is known. You can get user profiles of users who have not added the LINE Official Account as a friend or have blocked the LINE Official Account.
Room ID. Found in the source
object of webhook event objects.
User ID. Found in the source
object of webhook event objects. Do not use the LINE ID used in LINE.
Returns status code 200
and a JSON object with the following information.
displayName:
userId:
pictureUrl:
Get Members In Room Count
Gets the count of members in a room. You can get the member in room count even if the user hasn't added the LINE Official Account as a friend or has blocked the LINE Official Account.
Room ID. Found in the source
object of webhook event objects.
Returns status code 200
and a number representing room member count.
count:
Get Target Limit For Additional Messages
Gets the target limit for additional messages in the current month.
The number of messages retrieved by this operation includes the number of messages sent from LINE Official Account Manager.
Set a target limit with LINE Official Account Manager. For the procedures, refer to the LINE Official Account Manager manual.
Note: LINE@ accounts cannot call this API endpoint.
Returns status code 200
and a TargetLimitForAdditionalMessages.
Get User Profile
Gets user profile information.
User ID that is returned in a webhook event object. Do not use the LINE ID found on LINE.Message IDUser ID that is returned in a webhook event object. Do not use the LINE ID found on LINE.
Returns status code 200
and a JSON object with the following information.
displayName:
userId:
pictureUrl:
statusMessage:
Gets information on a webhook endpoint.
Returns status code 200 and a JSON object with the webhook information.
issueLinkToken
is deprecated. Use getLinkToken
instead. Note: It returns a string instead of an object.
Leave Group
Leaves a group.
Group ID. Found in the source
object of webhook event objects.
Returns status code 200
and an empty JSON object.
Leave Room
Leaves a room.
Room ID. Found in the source
object of webhook event objects.
Returns status code 200
and an empty JSON object.
Link Rich Menu
Links a rich menu to a user. Only one rich menu can be linked to a user at one time. If a user already has a rich menu linked, calling this endpoint replaces the existing rich menu with the one specified in your request.
The rich menu is displayed in the following order of priority (highest to lowest):
User ID. Found in the source
object of webhook event objects. Do not use the LINE ID used in LINE.
ID of a rich menu
Returns status code 200
and an empty JSON object.
Multicast Message
Sends push messages to multiple users at any time. Messages cannot be sent to groups or rooms.
Note: LINE@ accounts under the free or basic plan cannot call this API endpoint.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Messages to send (Max: 5)
Returns status code 200
and an empty JSON object.
Multicast Audio Message
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Audio
Length of audio file (milliseconds)
URL of audio file
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Button Template Message
Template with an image, title, text, and multiple action buttons.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Alternative text
Button template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Button Template Message
Template with an image, title, text, and multiple action buttons.
Because of the height limitation for buttons template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Alternative text
Button template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Carousel Template Message
Template with multiple columns which can be cycled like a carousel. The columns are shown in order when scrolling horizontally.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Alternative text
Array of columns for carousel
Max columns: 10
Carousel template options
Returns status code 200
and an empty JSON object.
Multicast Confirm Template Message
Template with two action buttons.
Because of the height limitation for confirm template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Alternative text
Confirm template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Flex Message
Flex Messages are messages with a customizable layout. You can customize the layout freely based on the specification for CSS Flexible Box (CSS Flexbox). For more information, see Sending Flex Messages in the API documentation.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Alternative text
Flex Message container
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Image Message
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Image
Image URL
Preview image URL
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Image Carousel Template Message
Template with multiple images which can be cycled like a carousel. The images are shown in order when scrolling horizontally.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Alternative text
Array of columns for image carousel
Max columns: 10
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Imagemap Message
Imagemap messages are messages configured with an image that has multiple tappable areas. You can assign one tappable area for the entire image or different tappable areas on divided areas of the image.
You can also play a video on the image and display a label with a hyperlink after the video is finished.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Alternative text
Imagemap
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Location Message
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Location
location.title:
location.address:
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Message
Sends push messages to multiple users at any time. Messages cannot be sent to groups or rooms.
Note: LINE@ accounts under the free or basic plan cannot call this API endpoint.
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Messages to send (Max: 5)
Returns status code 200
and an empty JSON object.
Multicast Message
Sends push messages to multiple users at any time. Messages cannot be sent to groups or rooms.
Note: LINE@ accounts under the free or basic plan cannot call this API endpoint.
Request body
Messages to send (Max: 5)
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Returns status code 200
and an empty JSON object.
Multicast Sticker Message
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Sticker
sticker.packageId:
sticker.stickerId:
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Template Message
Template messages are messages with predefined layouts which you can customize. For more information, see Template messages.
The following template types are available:
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Alternative text
A Buttons, Confirm, Carousel, or Image carousel object.
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Text Message
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Message text.
You can include the following emoji:
Max character limit: 2000
Common properties for messages
Returns status code 200
and an empty JSON object.
Multicast Video Message
Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE.
Video
URL of video file
A very wide or tall video may be cropped when played in some environments.
URL of preview image
Common properties for messages
Returns status code 200
and an empty JSON object.
Send Narrowcast Message
Sends a push message to multiple users. You can specify recipients using attributes (such as age, gender, OS, and region) or by retargeting (audiences). Messages cannot be sent to groups or rooms.
LINE Official Account migration
You can't call this API with a LINE@ account or LINE Official Account that hasn't been migrated to the account plans implemented on April 18, 2019. Please migrate your account first. For more information, see Migration of LINE@ accounts.
Messages to send
Narrowcast options
Returns the 202
HTTP status code and a JSON object with the following information.
requestId: string
For more information on how to check the status of a narrowcast message, see Get narrowcast message status.
Send Narrowcast Message
Sends a push message to multiple users. You can specify recipients using attributes (such as age, gender, OS, and region) or by retargeting (audiences). Messages cannot be sent to groups or rooms.
LINE Official Account migration
You can't call this API with a LINE@ account or LINE Official Account that hasn't been migrated to the account plans implemented on April 18, 2019. Please migrate your account first. For more information, see Migration of LINE@ accounts.
Messages to send
Narrowcast options
Returns the 202
HTTP status code and a JSON object with the following information.
requestId: string
For more information on how to check the status of a narrowcast message, see Get narrowcast message status.
Send Narrowcast Message
Sends a push message to multiple users. You can specify recipients using attributes (such as age, gender, OS, and region) or by retargeting (audiences). Messages cannot be sent to groups or rooms.
LINE Official Account migration
You can't call this API with a LINE@ account or LINE Official Account that hasn't been migrated to the account plans implemented on April 18, 2019. Please migrate your account first. For more information, see Migration of LINE@ accounts.
Request body
demographic:
If this is omitted, messages are sent to everyone—including users with attribute values of "unknown".
max:
Messages to send
RecipientObject. You can specify recipients of the message using up to 10 audiences.
If this is omitted, messages will be sent to all users who have added your LINE Official Account as a friend.
Returns the 202
HTTP status code and a JSON object with the following information.
requestId: string
For more information on how to check the status of a narrowcast message, see Get narrowcast message status.
Push Message
Sends a push message to a user, group, or room at any time.
Note: LINE@ accounts under the free or basic plan cannot call this API endpoint.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Messages to send (Max: 5)
Returns status code 200
and an empty JSON object.
Push Audio Message
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Audio
Length of audio file (milliseconds)
URL of audio file
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Button Template Message
Template with an image, title, text, and multiple action buttons.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Alternative text
Button template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Button Template Message
Template with an image, title, text, and multiple action buttons.
Because of the height limitation for buttons template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Alternative text
Button template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Carousel Template Message
Template with multiple columns which can be cycled like a carousel. The columns are shown in order when scrolling horizontally.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Alternative text
Array of columns for carousel
Max columns: 10
Carousel template options
Returns status code 200
and an empty JSON object.
Push Confirm Template Message
Template with two action buttons.
Because of the height limitation for confirm template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Alternative text
Confirm template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Flex Message
Flex Messages are messages with a customizable layout. You can customize the layout freely based on the specification for CSS Flexible Box (CSS Flexbox). For more information, see Sending Flex Messages in the API documentation.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Alternative text
Flex Message container
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Image Message
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Image
Image URL
Preview image URL
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Image Carousel Template Message
Template with multiple images which can be cycled like a carousel. The images are shown in order when scrolling horizontally.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Alternative text
Array of columns for image carousel
Max columns: 10
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Imagemap Message
Imagemap messages are messages configured with an image that has multiple tappable areas. You can assign one tappable area for the entire image or different tappable areas on divided areas of the image.
You can also play a video on the image and display a label with a hyperlink after the video is finished.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Alternative text
Imagemap
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Location Message
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Location
location.title:
location.address:
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Message
Sends a push message to a user, group, or room at any time.
Note: LINE@ accounts under the free or basic plan cannot call this API endpoint.
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Messages to send (Max: 5)
Returns status code 200
and an empty JSON object.
Push Message
Sends a push message to a user, group, or room at any time.
Note: LINE@ accounts under the free or basic plan cannot call this API endpoint.
Request body
Messages to send (Max: 5)
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Returns status code 200
and an empty JSON object.
Push Sticker Message
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Sticker
sticker.packageId:
sticker.stickerId:
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Template Message
Template messages are messages with predefined layouts which you can customize. For more information, see Template messages.
The following template types are available:
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Alternative text
A Buttons, Confirm, Carousel, or Image carousel object.
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Text Message
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Message text.
You can include the following emoji:
Max character limit: 2000
Common properties for messages
Returns status code 200
and an empty JSON object.
Push Video Message
ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object. Do not use the LINE ID found on LINE.
Video
URL of video file
A very wide or tall video may be cropped when played in some environments.
URL of preview image
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Message
Sends a reply message in response to an event from a user, group, or room.
To send reply messages, you must have a reply token which is included in a webhook event object.
Webhooks are used to notify you when an event occurs. For events that you can respond to, a reply token is issued for replying to messages.
Because the reply token becomes invalid after a certain period of time, responses should be sent as soon as a message is received. Reply tokens can only be used once.
Reply token received via webhook
Messages to send (Max: 5)
Returns status code 200
and an empty JSON object.
Reply Audio Message
Reply token received via webhook
Audio
Length of audio file (milliseconds)
URL of audio file
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Button Template Message
Template with an image, title, text, and multiple action buttons.
Reply token received via webhook
Alternative text
Button template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Button Template Message
Template with an image, title, text, and multiple action buttons.
Because of the height limitation for buttons template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
Reply token received via webhook
Alternative text
Button template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Carousel Template Message
Template with multiple columns which can be cycled like a carousel. The columns are shown in order when scrolling horizontally.
Reply token received via webhook
Alternative text
Array of columns for carousel
Max columns: 10
Carousel template options
Returns status code 200
and an empty JSON object.
Reply Confirm Template Message
Template with two action buttons.
Because of the height limitation for confirm template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
Reply token received via webhook
Alternative text
Confirm template object
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Flex Message
Flex Messages are messages with a customizable layout. You can customize the layout freely based on the specification for CSS Flexible Box (CSS Flexbox). For more information, see Sending Flex Messages in the API documentation.
Reply token received via webhook
Alternative text
Flex Message container
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Image Message
Reply token received via webhook
Image
Image URL
Preview image URL
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Image Carousel Template Message
Template with multiple images which can be cycled like a carousel. The images are shown in order when scrolling horizontally.
Reply token received via webhook
Alternative text
Array of columns for image carousel
Max columns: 10
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Imagemap Message
Imagemap messages are messages configured with an image that has multiple tappable areas. You can assign one tappable area for the entire image or different tappable areas on divided areas of the image.
You can also play a video on the image and display a label with a hyperlink after the video is finished.
Reply token received via webhook
Alternative text
Imagemap
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Location Message
Reply token received via webhook
Location
location.title:
location.address:
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Message
Sends a reply message in response to an event from a user, group, or room.
To send reply messages, you must have a reply token which is included in a webhook event object.
Webhooks are used to notify you when an event occurs. For events that you can respond to, a reply token is issued for replying to messages.
Because the reply token becomes invalid after a certain period of time, responses should be sent as soon as a message is received. Reply tokens can only be used once.
Reply token received via webhook
Messages to send (Max: 5)
Returns status code 200
and an empty JSON object.
Reply Message Sends a reply message in response to an event from a user, group, or room.
To send reply messages, you must have a reply token which is included in a webhook event object.
Webhooks are used to notify you when an event occurs. For events that you can respond to, a reply token is issued for replying to messages.
Because the reply token becomes invalid after a certain period of time, responses should be sent as soon as a message is received. Reply tokens can only be used once.
Request body
Messages to send (Max: 5)
Reply token received via webhook
Returns status code 200
and an empty JSON object.
Reply Sticker Message
Reply token received via webhook
Sticker
sticker.packageId:
sticker.stickerId:
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Template Message
Template messages are messages with predefined layouts which you can customize. For more information, see Template messages.
The following template types are available:
Reply token received via webhook
Alternative text
A Buttons, Confirm, Carousel, or Image carousel object.
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Text Message
Reply token received via webhook
Message text.
You can include the following emoji:
Max character limit: 2000
Common properties for messages
Returns status code 200
and an empty JSON object.
Reply Video Message
Reply token received via webhook
Video
URL of video file
A very wide or tall video may be cropped when played in some environments.
URL of preview image
Common properties for messages
Returns status code 200
and an empty JSON object.
retrieveMessageContent
is deprecated. Use getMessageContent
instead.
Set Default Rich Menu
Sets the default rich menu. The default rich menu is displayed to all users who have added your LINE Official Account as a friend and are not linked to any per-user rich menu. If a default rich menu has already been set, calling this endpoint replaces the current default rich menu with the one specified in your request.
The rich menu is displayed in the following order of priority (highest to lowest):
ID of a rich menu
Returns status code 200
and an empty JSON object.
Set Description of Audience Group
Renames an existing audience.
The audience's name. Audience names must be unique. This is case-insensitive, meaning AUDIENCE
and audience
are considered identical.
The audience ID.
Returns the 200
HTTP status code.
Sets the webhook endpoint URL. It may take up to 1 minute for changes to take place due to caching.
Webhook URL.
Returns status code 200
and an empty JSON object.
Checks if the configured webhook endpoint can receive a test webhook event.
Returns status code 200 and a JSON object with the webhook information.
Unlink Rich Menu
Unlinks a rich menu from a user.
User ID. Found in the source
object of webhook event objects. Do not use the LINE ID used in LINE.
Returns status code 200
and an empty JSON object.
Update LIFF App (LIFF v1)
Partially updates LIFF app settings.
ID of the LIFF app to be updated
Partial LIFF app settings. Only the properties specified in the request body are updated.
Status code 200
is returned.
Create Upload Audience Group
Adds new user IDs or IFAs to an audience for uploading user IDs.
【Request timeout values】
We strongly recommend using request timeout values of 30 seconds or more.
【You can't switch between user IDs and IFAs】
Add the same type of data (user IDs or IFAs) to an audience for uploading user IDs as you originally specified when creating that audience. For example, you can't add user IDs to an audience that originally used IFAs when it was created.
You can use an audience's isIfaAudience
property to determine which type of recipient (user IDs or IFAs) was specified when the audience was created. For more details, see Get audience data.
【You can't delete user IDs or IFAs】
You cannot delete a user ID or IFA after adding it.
The audience ID.
An array of up to 10,000 user IDs or IFAs.
Update upload audience group options.
Returns the HTTP 202
status code.
Upload Rich Menu Image
Uploads and attaches an image to a rich menu.
You can use rich menu images with the following specifications:
Note: You cannot replace an image attached to a rich menu. To update your rich menu image, create a new rich menu object and upload another image.
The ID of the rich menu to attach the image to
image
Returns status code 200
and an empty JSON object.
Generated using TypeDoc
LineClient is a client for LINE API calls.