Interface LineMessagingClient
- All Known Implementing Classes:
LineMessagingClientImpl
-
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
broadcast
(com.linecorp.bot.model.Broadcast broadcast) Sends push messages to multiple users at any time.static LineMessagingClientBuilder
builder
(ChannelTokenSupplier channelTokenSupplier) static LineMessagingClientBuilder
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
Cancel default rich menu.CompletableFuture<com.linecorp.bot.model.richmenu.RichMenuIdResponse>
createRichMenu
(com.linecorp.bot.model.richmenu.RichMenu richMenu) Creates a rich menu.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
createRichMenuAlias
(com.linecorp.bot.model.richmenualias.CreateRichMenuAliasRequest request) Create a rich menu alias.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
deleteRichMenu
(String richMenuId) Deletes a rich menu.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
deleteRichMenuAlias
(String richMenuAliasId) Delete specified rich menu alias.CompletableFuture<com.linecorp.bot.model.response.GetAggregationUnitNameListResponse>
getAggregationUnitNameList
(String limit, String start) Get name list of units used this month.CompletableFuture<com.linecorp.bot.model.response.GetAggregationUnitUsageResponse>
Get number of units used this month.CompletableFuture<com.linecorp.bot.model.response.BotInfoResponse>
Gets a bot's basic information.CompletableFuture<com.linecorp.bot.model.richmenu.RichMenuIdResponse>
Get default rich menu ID.CompletableFuture<com.linecorp.bot.model.response.GetFollowersResponse>
getFollowers
(com.linecorp.bot.model.request.GetFollowersRequest request) Get a list of users who added your LINE Official Account as a friend.CompletableFuture<com.linecorp.bot.model.response.demographics.GetFriendsDemographicsResponse>
Retrieves the demographic attributes for a bot's friends.CompletableFuture<com.linecorp.bot.model.group.GroupMemberCountResponse>
getGroupMemberCount
(String groupId) Get members in group count.CompletableFuture<com.linecorp.bot.model.profile.UserProfileResponse>
getGroupMemberProfile
(String groupId, String userId) Get group member profile.CompletableFuture<com.linecorp.bot.model.profile.MembersIdsResponse>
getGroupMembersIds
(String groupId, String start) Get (a part of) group member list.CompletableFuture<com.linecorp.bot.model.group.GroupSummaryResponse>
getGroupSummary
(String groupId) Get group summary.CompletableFuture<com.linecorp.bot.model.response.GetMessageEventResponse>
getMessageEvent
(String requestId) Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account.CompletableFuture<com.linecorp.bot.model.response.MessageQuotaResponse>
Gets the target limit for additional messages in the current month.CompletableFuture<com.linecorp.bot.model.response.QuotaConsumptionResponse>
Gets the number of messages sent in the current month.CompletableFuture<com.linecorp.bot.model.response.NarrowcastProgressResponse>
getNarrowcastProgress
(String requestId) Gets the status of a narrowcast message.CompletableFuture<com.linecorp.bot.model.response.GetNumberOfFollowersResponse>
getNumberOfFollowers
(String date) Gets the number of users who have added the bot on or before a specified date.CompletableFuture<com.linecorp.bot.model.response.GetNumberOfMessageDeliveriesResponse>
Get number of message deliveries.CompletableFuture<com.linecorp.bot.model.response.NumberOfMessagesResponse>
Gets the number of messages sent with the"/bot/message/broadcast"
endpoint.CompletableFuture<com.linecorp.bot.model.response.NumberOfMessagesResponse>
Gets the number of messages sent with the /bot/message/multicast endpoint.CompletableFuture<com.linecorp.bot.model.response.NumberOfMessagesResponse>
Gets the number of messages sent with the /bot/message/push endpoint.CompletableFuture<com.linecorp.bot.model.response.NumberOfMessagesResponse>
Gets the number of messages sent with the /bot/message/reply endpoint.CompletableFuture<com.linecorp.bot.model.profile.UserProfileResponse>
getProfile
(String userId) Get user profile information.CompletableFuture<com.linecorp.bot.model.richmenu.RichMenuResponse>
getRichMenu
(String richMenuId) Get a rich menu.CompletableFuture<com.linecorp.bot.model.richmenualias.RichMenuAliasResponse>
getRichMenuAlias
(String richMenuAliasId) Get specified rich menu alias.CompletableFuture<com.linecorp.bot.model.richmenualias.RichMenuAliasListResponse>
Get rich menu alias list.CompletableFuture<com.linecorp.bot.model.richmenu.RichMenuIdResponse>
getRichMenuIdOfUser
(String userId) Get rich menu ID of user.CompletableFuture<com.linecorp.bot.model.richmenu.RichMenuListResponse>
Gets a list of all uploaded rich menus.CompletableFuture<com.linecorp.bot.model.room.RoomMemberCountResponse>
getRoomMemberCount
(String roomId) Get members in room count.CompletableFuture<com.linecorp.bot.model.profile.UserProfileResponse>
getRoomMemberProfile
(String roomId, String userId) Get room member profile.CompletableFuture<com.linecorp.bot.model.profile.MembersIdsResponse>
getRoomMembersIds
(String roomId, String start) Get (a part of) room member list.CompletableFuture<com.linecorp.bot.model.response.GetStatisticsPerUnitResponse>
getStatisticsPerUnit
(String customAggregationUnit, String from, String to) Get statistics per aggregation unit.CompletableFuture<com.linecorp.bot.model.response.GetWebhookEndpointResponse>
Gets webhook endpoint information.CompletableFuture<com.linecorp.bot.model.response.IssueLinkTokenResponse>
issueLinkToken
(String userId) Issues a link token used for the account link feature.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
leaveGroup
(String groupId) Leave a group.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
Leave a room.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
linkRichMenuIdToUser
(String userId, String richMenuId) Link rich menu to user.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
linkRichMenuIdToUsers
(List<String> userIds, String richMenuId) Link rich menu to users.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
multicast
(com.linecorp.bot.model.Multicast multicast) Send messages to multiple users at any time.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
narrowcast
(com.linecorp.bot.model.Narrowcast broadcast) Sends a push message to multiple users.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
pushMessage
(com.linecorp.bot.model.PushMessage pushMessage) Send messages to users when you want to.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
replyMessage
(com.linecorp.bot.model.ReplyMessage replyMessage) Reply to messages from users.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
setDefaultRichMenu
(String richMenuId) Set default rich menu.CompletableFuture<com.linecorp.bot.model.response.SetWebhookEndpointResponse>
setWebhookEndpoint
(com.linecorp.bot.model.request.SetWebhookEndpointRequest request) Sets webhook endpoint URL.CompletableFuture<com.linecorp.bot.model.response.TestWebhookEndpointResponse>
testWebhookEndpoint
(com.linecorp.bot.model.request.TestWebhookEndpointRequest request) Tests webhook endpoint.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
unlinkRichMenuIdFromUser
(String userId) Unlink rich menu from user.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
unlinkRichMenuIdFromUsers
(List<String> userIds) Unlink rich menu from users.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
updateRichMenuAlias
(String richMenuAliasId, com.linecorp.bot.model.richmenualias.UpdateRichMenuAliasRequest request) Update the rich menu Id which associated with the rich menu alias.CompletableFuture<com.linecorp.bot.model.response.BotApiResponse>
validateRichMenuObject
(com.linecorp.bot.model.richmenu.RichMenu richMenu) Validate a rich menu object.
-
Method Details
-
replyMessage
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> replyMessage(com.linecorp.bot.model.ReplyMessage replyMessage) Reply to messages from users.Webhooks are used to notify you when an event occurs. For events that you can respond to, a replyToken is issued for replying to messages.
Because the replyToken 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.
-
pushMessage
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> pushMessage(com.linecorp.bot.model.PushMessage pushMessage) Send messages to users when you want to.INFO: Use of the Push Message API is limited to certain plans.
-
multicast
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> multicast(com.linecorp.bot.model.Multicast multicast) Send messages to multiple users at any time. IDs of groups or rooms cannot be used.INFO: Only available for plans which support push messages. Messages cannot be sent to groups or rooms.
INFO: Use IDs returned via the webhook event of source users. IDs of groups or rooms cannot be used. Do not use the LINE ID found on the LINE app.
-
broadcast
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> broadcast(com.linecorp.bot.model.Broadcast broadcast) Sends push messages to multiple users at any time. Note: LINE@ accounts cannot call this API endpoint. Please migrate it to a LINE official account. For more information, see Migration of LINE@ accounts. -
narrowcast
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> narrowcast(com.linecorp.bot.model.Narrowcast broadcast) 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.Note: LINE-@ accounts cannot call this API endpoint. Please migrate it to a LINE official account. For more information, see Migration of LINE@ accounts.
-
getNarrowcastProgress
CompletableFuture<com.linecorp.bot.model.response.NarrowcastProgressResponse> getNarrowcastProgress(String requestId) Gets the status of a narrowcast message. -
getMessageQuota
CompletableFuture<com.linecorp.bot.model.response.MessageQuotaResponse> getMessageQuota()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. -
getMessageQuotaConsumption
CompletableFuture<com.linecorp.bot.model.response.QuotaConsumptionResponse> getMessageQuotaConsumption()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. -
getNumberOfSentReplyMessages
CompletableFuture<com.linecorp.bot.model.response.NumberOfMessagesResponse> getNumberOfSentReplyMessages(String date) Gets the number of messages sent with the /bot/message/reply endpoint. Note that the number of messages retrieved by this operation does not include the number of messages sent from LINE@ Manager.- Parameters:
date
- Date the messages were sent. The format should beyyyyMMdd
(for Example: "20191231") and the timezone should be UTC+9.
-
getNumberOfSentPushMessages
CompletableFuture<com.linecorp.bot.model.response.NumberOfMessagesResponse> getNumberOfSentPushMessages(String date) Gets the number of messages sent with the /bot/message/push endpoint. Note that the number of messages retrieved by this operation does not include the number of messages sent from LINE@ Manager.- Parameters:
date
- Date the messages were sent. The format should beyyyyMMdd
(for Example: "20191231") and the timezone should be UTC+9.
-
getNumberOfSentMulticastMessages
CompletableFuture<com.linecorp.bot.model.response.NumberOfMessagesResponse> getNumberOfSentMulticastMessages(String date) 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@ Manager.- Parameters:
date
- Date the messages were sent. The format should beyyyyMMdd
(for Example: "20191231") and the timezone should be UTC+9.
-
getNumberOfSentBroadcastMessages
CompletableFuture<com.linecorp.bot.model.response.NumberOfMessagesResponse> getNumberOfSentBroadcastMessages(String date) 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. Note: LINE@ accounts cannot call this API endpoint. Please migrate it to a LINE official account. For more information, see Migration of LINE@ accounts.- Parameters:
date
- Date the messages were sent. The format should beyyyyMMdd
(for Example: "20191231") and the timezone should be UTC+9.
-
getProfile
Get user profile information. -
getGroupMemberProfile
CompletableFuture<com.linecorp.bot.model.profile.UserProfileResponse> getGroupMemberProfile(String groupId, String userId) Get group member profile.- Parameters:
groupId
- Identifier of the group. Can be get byGroupSource.getGroupId()
.userId
- Identifier of the user.- See Also:
-
getRoomMemberProfile
CompletableFuture<com.linecorp.bot.model.profile.UserProfileResponse> getRoomMemberProfile(String roomId, String userId) Get room member profile.- Parameters:
roomId
- Identifier of the group. Can be get byRoomSource.getRoomId()
.userId
- Identifier of the user.- See Also:
-
getGroupMembersIds
CompletableFuture<com.linecorp.bot.model.profile.MembersIdsResponse> getGroupMembersIds(String groupId, String start) Get (a part of) group member list.- Parameters:
start
- nullable continuationToken which can be getMembersIdsResponse.getNext()
- See Also:
-
- //developers.line.me/en/reference/messaging-api/#get-group-member-user-ids
MembersIdsResponse.getNext()
-
getRoomMembersIds
CompletableFuture<com.linecorp.bot.model.profile.MembersIdsResponse> getRoomMembersIds(String roomId, String start) Get (a part of) room member list.- Parameters:
start
- nullable continuationToken which can be getMembersIdsResponse.getNext()
- See Also:
-
- //developers.line.me/en/reference/messaging-api/#get-room-member-user-ids
MembersIdsResponse.getNext()
-
leaveGroup
Leave a group. -
leaveRoom
Leave a room. -
getGroupSummary
CompletableFuture<com.linecorp.bot.model.group.GroupSummaryResponse> getGroupSummary(String groupId) Get group summary. -
getGroupMemberCount
CompletableFuture<com.linecorp.bot.model.group.GroupMemberCountResponse> getGroupMemberCount(String groupId) Get members in group count. -
getRoomMemberCount
CompletableFuture<com.linecorp.bot.model.room.RoomMemberCountResponse> getRoomMemberCount(String roomId) Get members in room count. -
getRichMenu
Get a rich menu. -
deleteRichMenu
Deletes a rich menu. -
getRichMenuIdOfUser
CompletableFuture<com.linecorp.bot.model.richmenu.RichMenuIdResponse> getRichMenuIdOfUser(String userId) Get rich menu ID of user. -
linkRichMenuIdToUser
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> linkRichMenuIdToUser(String userId, String richMenuId) Link rich menu to user. -
linkRichMenuIdToUsers
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> linkRichMenuIdToUsers(List<String> userIds, String richMenuId) Link rich menu to users.- See Also:
-
unlinkRichMenuIdFromUser
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> unlinkRichMenuIdFromUser(String userId) Unlink rich menu from user. -
unlinkRichMenuIdFromUsers
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> unlinkRichMenuIdFromUsers(List<String> userIds) Unlink rich menu from users.- See Also:
-
getRichMenuList
CompletableFuture<com.linecorp.bot.model.richmenu.RichMenuListResponse> getRichMenuList()Gets a list of all uploaded rich menus. -
setDefaultRichMenu
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> setDefaultRichMenu(String richMenuId) Set default rich menu. -
getDefaultRichMenuId
CompletableFuture<com.linecorp.bot.model.richmenu.RichMenuIdResponse> getDefaultRichMenuId()Get default rich menu ID. -
cancelDefaultRichMenu
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> cancelDefaultRichMenu()Cancel default rich menu. -
getRichMenuAlias
CompletableFuture<com.linecorp.bot.model.richmenualias.RichMenuAliasResponse> getRichMenuAlias(String richMenuAliasId) Get specified rich menu alias. -
getRichMenuAliasList
CompletableFuture<com.linecorp.bot.model.richmenualias.RichMenuAliasListResponse> getRichMenuAliasList()Get rich menu alias list. -
deleteRichMenuAlias
CompletableFuture<com.linecorp.bot.model.response.BotApiResponse> deleteRichMenuAlias(String richMenuAliasId) Delete specified rich menu alias. -
issueLinkToken
CompletableFuture<com.linecorp.bot.model.response.IssueLinkTokenResponse> issueLinkToken(String userId) Issues a link token used for the account link feature.- See Also:
-
getNumberOfMessageDeliveries
CompletableFuture<com.linecorp.bot.model.response.GetNumberOfMessageDeliveriesResponse> getNumberOfMessageDeliveries(String date) Get number of message deliveries.- See Also:
-
LineMessagingService.getNumberOfMessageDeliveries(String)
-
getNumberOfFollowers
CompletableFuture<com.linecorp.bot.model.response.GetNumberOfFollowersResponse> getNumberOfFollowers(String date) Gets the number of users who have added the bot on or before a specified date. -
getFollowers
CompletableFuture<com.linecorp.bot.model.response.GetFollowersResponse> getFollowers(com.linecorp.bot.model.request.GetFollowersRequest request) Get a list of users who added your LINE Official Account as a friend. -
getMessageEvent
CompletableFuture<com.linecorp.bot.model.response.GetMessageEventResponse> getMessageEvent(String requestId) Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account.You can get statistics per message or per bubble.
- Parameters:
requestId
- Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID. Find it in the response headers.
-
getFriendsDemographics
CompletableFuture<com.linecorp.bot.model.response.demographics.GetFriendsDemographicsResponse> getFriendsDemographics()Retrieves the demographic attributes for a bot's friends.- See Also:
-
getBotInfo
CompletableFuture<com.linecorp.bot.model.response.BotInfoResponse> getBotInfo()Gets a bot's basic information.- See Also:
-
getWebhookEndpoint
CompletableFuture<com.linecorp.bot.model.response.GetWebhookEndpointResponse> getWebhookEndpoint()Gets webhook endpoint information.- See Also:
-
setWebhookEndpoint
CompletableFuture<com.linecorp.bot.model.response.SetWebhookEndpointResponse> setWebhookEndpoint(com.linecorp.bot.model.request.SetWebhookEndpointRequest request) Sets webhook endpoint URL.- See Also:
-
testWebhookEndpoint
CompletableFuture<com.linecorp.bot.model.response.TestWebhookEndpointResponse> testWebhookEndpoint(com.linecorp.bot.model.request.TestWebhookEndpointRequest request) Tests webhook endpoint.- See Also:
-
getStatisticsPerUnit
CompletableFuture<com.linecorp.bot.model.response.GetStatisticsPerUnitResponse> getStatisticsPerUnit(String customAggregationUnit, String from, String to) Get statistics per aggregation unit.The API can only be used by corporate users who have submitted the required applications.
- See Also:
-
getAggregationUnitUsage
CompletableFuture<com.linecorp.bot.model.response.GetAggregationUnitUsageResponse> getAggregationUnitUsage()Get number of units used this month.The API can only be used by corporate users who have submitted the required applications.
- See Also:
-
getAggregationUnitNameList
CompletableFuture<com.linecorp.bot.model.response.GetAggregationUnitNameListResponse> getAggregationUnitNameList(String limit, String start) Get name list of units used this month.The API can only be used by corporate users who have submitted the required applications.
- See Also:
-
builder
-
builder
-