Menu

## LINEBot
in package

LINEBot.php : 42

A client class of LINE Messaging API.

##### Tags

SuppressWarnings

  (PHPMD.TooManyPublicMethods)

### Table of Contents

DEFAULT_DATA_ENDPOINT_BASE = 'https://api-data.line.me'
DEFAULT_ENDPOINT_BASE = 'https://api.line.me'
$channelSecret : string
$dataEndpointBase : string
$endpointBase : string
$httpClient : HTTPClient
__construct() : mixed
  LINEBot constructor.
activateAudience() : Response
  Activate the audience
broadcast() : Response
  Sends push messages to multiple users at any time.
bulkLinkRichMenu() : Response
  Links a rich menu to multiple users.
bulkUnlinkRichMenu() : Response
  Unlinks rich menus from multiple users.
cancelDefaultRichMenuId() : Response
  Cancel the default rich menu.
createAudienceGroupForClick() : Response
  Create audience for click-based retargeting
createAudienceGroupForImpression() : Response
  Create audience for impression-based retargeting
createAudienceGroupForUploadingUserIds() : Response
  Create audience for uploading user IDs
createAudienceGroupForUploadingUserIdsByFile() : Response
  Create audience for uploading user IDs (by file)
createChannelAccessToken() : Response
  Create channel access token
createChannelAccessToken21() : Response
  Create channel access token v2.1
createLinkToken() : Response
  Issues a link token used for the account link feature.
createRichMenu() : Response
  Creates a rich menu.
createRichMenuAlias() : Response
  Create rich menu alias
deleteAudience() : Response
  Delete audience
deleteRichMenu() : Response
  Deletes a rich menu.
deleteRichMenuAlias() : Response
  Delete rich menu alias
downloadRichMenuImage() : Response
  Downloads an image associated with a rich menu.
getAllFollowerIds() : array<string|int, mixed>
  Gets the list of User IDs of users who have added your LINE Official Account as a friend.
getAllGroupMemberIds() : array<string|int, mixed>
  Gets the user IDs of the members of a group that the bot is in.
getAllNameListOfUnitsUsedThisMonth() : array<string|int, mixed>
  Get the name list of units used this month for statistics aggregation.
getAllRoomMemberIds() : array<string|int, mixed>
  Gets the user IDs of the members of a room that the bot is in.
getAudience() : Response
  Get audience
getAudiences() : Response
  Get data for multiple audiences
getAuthorityLevel() : Response
  Get the authority level of the audience
getBotInfo() : Response
  Get basic information about bot.
getChannelAccessToken21Keys() : Response
  Get all valid channel access token key IDs v2.1
getDefaultRichMenuId() : Response
  Get the default rich menu ID.
getFollowerIds() : Response
  Gets the list of User IDs of users who have added your LINE Official Account as a friend.
getFriendDemographics() : Response
  Get friend demographics
getGroupMemberIds() : Response
  Gets the user IDs of the members of a group that the bot is in.
getGroupMemberProfile() : Response
  Gets the user profile of a member of a group that the bot is in.
getGroupMembersCount() : Response
  Gets the count of members in a group
getGroupSummary() : Response
  Get group summary
getMessageContent() : Response
  Gets message content which is associated with specified message ID.
getNameListOfUnitsUsedThisMonth() : Response
  Get the name list of units used this month for statistics aggregation.
getNarrowcastProgress() : Response
  Get Narrowcast message sending progress.
getNumberOfFollowers() : Response
  Get number of followers
getNumberOfLimitForAdditional() : Response
  Gets the target limit for additional messages in the current month.
getNumberOfMessageDeliveries() : Response
  Get number of message deliveries
getNumberOfSentBroadcastMessages() : Response
  Get number of sent broadcast messages
getNumberOfSentMulticastMessages() : Response
  Get number of sent multicast messages
getNumberOfSentPushMessages() : Response
  Get number of sent push messages
getNumberOfSentReplyMessages() : Response
  Get number of sent reply messages
getNumberOfSentThisMonth() : Response
  Gets the number of messages sent in the current month.
getNumberOfUnitsUsedThisMonth() : Response
  Get the number of aggregation units used this month.
getProfile() : Response
  Gets specified user's profile through API calling.
getRichMenu() : Response
  Gets a rich menu via a rich menu ID.
getRichMenuAlias() : Response
  Get rich menu alias information
getRichMenuAliasList() : Response
  Get list of rich menu alias
getRichMenuId() : Response
  Gets the ID of the rich menu linked to a user.
getRichMenuList() : Response
  Gets a list of all uploaded rich menus.
getRoomMemberIds() : Response
  Gets the user IDs of the members of a room that the bot is in.
getRoomMemberProfile() : Response
  Gets the user profile of a member of a room that the bot is in.
getRoomMembersCount() : Response
  Gets the count of members in a room
getUserInteractionStatistics() : Response
  Get user interaction statistics
getUserInteractionStatisticsPerUnit() : Response
  Get the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account.
getWebhookEndpointInfo() : Response
  Get webhook endpoint information
leaveGroup() : Response
  Leaves from group.
leaveRoom() : Response
  Leaves from room.
linkRichMenu() : Response
  Links a rich menu to a user. Only one rich menu can be linked to a user at one time.
multicast() : Response
  Sends arbitrary message to multi destinations.
parseEventRequest() : mixed
  Parse event request to Event objects.
pushMessage() : Response
  Sends arbitrary message to destination.
renameAudience() : Response
  Rename an audience
replyMessage() : Response
  Replies arbitrary message to destination which is associated with reply token.
replyText() : Response
  Replies text message(s) to destination which is associated with reply token.
revokeChannelAccessToken() : Response
  Revoke channel access token
revokeChannelAccessToken21() : Response
  Revoke channel access token v2.1
sendNarrowcast() : Response
  Send Narrowcast message.
setDefaultRichMenuId() : Response
  Set the default rich menu.
setWebhookEndpoint() : Response
  Set webhook endpoint URL
testWebhookEndpoint() : Response
  Checks if the configured webhook endpoint can receive a test webhook event
unlinkRichMenu() : Response
  Unlinks a rich menu from multiple user.
updateAudienceGroupForUploadingUserIds() : Response
  Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs
updateAudienceGroupForUploadingUserIdsByFile() : Response
  Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by file)
updateAuthorityLevel() : Response
  Change the authority level of the audience
updateRichMenuAlias() : Response
  Update rich menu alias
uploadRichMenuImage() : Response
  Uploads and attaches an image to a rich menu.
validateSignature() : bool
  Validate request with signature.

### Constants

#### DEFAULT_DATA_ENDPOINT_BASE

LINEBot.php : 45
`public mixed DEFAULT_DATA_ENDPOINT_BASE = 'https://api-data.line.me'`

#### DEFAULT_ENDPOINT_BASE

LINEBot.php : 44
`public mixed DEFAULT_ENDPOINT_BASE = 'https://api.line.me'`

### Properties

#### $channelSecret

LINEBot.php : 48
`private string $channelSecret`

#### $dataEndpointBase

LINEBot.php : 52
`private string $dataEndpointBase`

#### $endpointBase

LINEBot.php : 50
`private string $endpointBase`

#### $httpClient

LINEBot.php : 54
`private HTTPClient $httpClient`

### Methods

#### __construct()

LINEBot.php : 62

LINEBot constructor.

`public __construct(HTTPClient $httpClient, array<string|int, mixed> $args) : mixed`

##### Parameters

$httpClient : HTTPClient

  HTTP client instance to use API calling.

$args : array<string|int, mixed>

  Configurations.

##### Return values

mixed —

#### activateAudience()

LINEBot.php : 1296

Activate the audience

`public activateAudience(int $audienceGroupId) : Response`

##### Parameters

$audienceGroupId : int

  The audience ID.

##### Return values

Response —

#### broadcast()

LINEBot.php : 296

Sends push messages to multiple users at any time.

`public broadcast(MessageBuilder $messageBuilder[, bool $notificationDisabled = false ][, string|null $retryKey = null ]) : Response`

LINE@ accounts cannot call this API endpoint. Please migrate it to a LINE official account.

##### Parameters

$messageBuilder : MessageBuilder

  Message builder to send.

$notificationDisabled : bool = false

  Don't send push notifications(=true) or send(=false)

$retryKey : string|null = null

  UUID(example: 123e4567-e89b-12d3-a456-426614174000) or Not needed retry(=null)

##### Return values

Response —

#### bulkLinkRichMenu()

LINEBot.php : 632

Links a rich menu to multiple users.

`public bulkLinkRichMenu(array<string|int, string> $userIds, string $richMenuId) : Response`

##### Parameters

$userIds : array<string|int, string>

  Found in the source object of webhook event objects. Max: 150 user IDs.

$richMenuId : string

  ID of an uploaded rich menu

##### Return values

Response —

#### bulkUnlinkRichMenu()

LINEBot.php : 659

Unlinks rich menus from multiple users.

`public bulkUnlinkRichMenu(array<string|int, string> $userIds) : Response`

##### Parameters

$userIds : array<string|int, string>

  Found in the source object of webhook event objects. Max: 150 user IDs.

##### Return values

Response —

#### cancelDefaultRichMenuId()

LINEBot.php : 589

Cancel the default rich menu.

`public cancelDefaultRichMenuId() : Response`

##### Return values

Response —

#### createAudienceGroupForClick()

LINEBot.php : 1162

Create audience for click-based retargeting

`public createAudienceGroupForClick(string $description, string $requestId[, string|null $clickUrl = null ]) : Response`

##### Parameters

$description : string

  The audience's name. Max character limit: 120

$requestId : string

  The request ID of a broadcast or narrowcast message sent in the past 60 days.

$clickUrl : string|null = null

  The URL clicked by the user. Max character limit: 2,000

##### Return values

Response —

#### createAudienceGroupForImpression()

LINEBot.php : 1181

Create audience for impression-based retargeting

`public createAudienceGroupForImpression(string $description, string $requestId) : Response`

##### Parameters

$description : string

  The audience's name. Max character limit: 120

$requestId : string

  The request ID of a broadcast or narrowcast message sent in the past 60 days.

##### Return values

Response —

#### createAudienceGroupForUploadingUserIds()

LINEBot.php : 1059

Create audience for uploading user IDs

`public createAudienceGroupForUploadingUserIds(string $description[, array<string|int, mixed> $audiences = [] ][, bool $isIfaAudience = false ][, string|null $uploadDescription = null ]) : Response`

##### Parameters

$description : string

  The audience's name. Max character limit: 120

$audiences : array<string|int, mixed> = []

  An array of up to 10,000 user IDs or IFAs.

$isIfaAudience : bool = false

  If this is false (default), recipients are specified by user IDs.

$uploadDescription : string|null = null

  The description to register with the job.

##### Return values

Response —

#### createAudienceGroupForUploadingUserIdsByFile()

LINEBot.php : 1087

Create audience for uploading user IDs (by file)

`public createAudienceGroupForUploadingUserIdsByFile(string $description, string $filePath[, bool $isIfaAudience = false ][, string|null $uploadDescription = null ]) : Response`

##### Parameters

$description : string

  The audience's name. Max character limit: 120

$filePath : string

  A text file path with one user ID or IFA entered per line. Max number: 1,500,000

$isIfaAudience : bool = false

  If this is false (default), recipients are specified by user IDs.

$uploadDescription : string|null = null

  The description to register with the job.

##### Return values

Response —

#### createChannelAccessToken()

LINEBot.php : 899

Create channel access token

`public createChannelAccessToken(string $channelId) : Response`

Create a short-lived channel access token. Up to 30 tokens can be issued. If the maximum is exceeded, existing channel access tokens are revoked in the order of when they were first issued.

##### Parameters

$channelId : string

##### Return values

Response —

#### createChannelAccessToken21()

LINEBot.php : 941

Create channel access token v2.1

`public createChannelAccessToken21(string $jwt) : Response`

You can issue up to 30 tokens. If you reach the maximum limit, additional requests of issuing channel access tokens are blocked.

##### Parameters

$jwt : string

##### Tags

see
  https://developers.line.biz/en/docs/messaging-api/generate-json-web-token/#generate_jwt

##### Return values

Response —

#### createLinkToken()

LINEBot.php : 518

Issues a link token used for the account link feature.

`public createLinkToken(string $userId) : Response`

##### Parameters

$userId : string

  User ID for the LINE account to be linked.

##### Return values

Response —

#### createRichMenu()

LINEBot.php : 544

Creates a rich menu.

`public createRichMenu(RichMenuBuilder $richMenuBuilder) : Response`

You must upload a rich menu image and link the rich menu to a user for the rich menu to be displayed.

##### Parameters

$richMenuBuilder : RichMenuBuilder

##### Return values

Response —

#### createRichMenuAlias()

LINEBot.php : 722

Create rich menu alias

`public createRichMenuAlias(string $richMenuAliasId, string $richMenuId) : Response`

##### Parameters

$richMenuAliasId : string

  Rich menu alias ID, which can be any ID, unique for each channel.

$richMenuId : string

  The rich menu ID to be associated with the rich menu alias.

##### Return values

Response —

#### deleteAudience()

LINEBot.php : 1211

Delete audience

`public deleteAudience(int $audienceGroupId) : Response`

##### Parameters

$audienceGroupId : int

  The audience ID.

##### Return values

Response —

#### deleteRichMenu()

LINEBot.php : 555

Deletes a rich menu.

`public deleteRichMenu(string $richMenuId) : Response`

##### Parameters

$richMenuId : string

  ID of an uploaded rich menu

##### Return values

Response —

#### deleteRichMenuAlias()

LINEBot.php : 736

Delete rich menu alias

`public deleteRichMenuAlias(string $richMenuAliasId) : Response`

##### Parameters

$richMenuAliasId : string

  The rich menu alias ID whose information you want to obtain.

##### Return values

Response —

#### downloadRichMenuImage()

LINEBot.php : 673

Downloads an image associated with a rich menu.

`public downloadRichMenuImage(string $richMenuId) : Response`

##### Parameters

$richMenuId : string

  ID of an uploaded rich menu

##### Return values

Response —

#### getAllFollowerIds()

LINEBot.php : 128

Gets the list of User IDs of users who have added your LINE Official Account as a friend.

`public getAllFollowerIds() : array<string|int, mixed>`

These users' IDs won't be included in the obtained list of user IDs:

- Users who blocked the target LINE Official Account after adding it as a friend.
- Users who haven't consented to their profile information being obtained.

This method gets all of followers by calling getFollowerIds() continually using token

This feature is only available for LINE@ Approved accounts or official accounts.

##### Tags

see
  LINEBot::getFollowerIds()

##### Return values

array<string|int, mixed> —

userIds

#### getAllGroupMemberIds()

LINEBot.php : 431

Gets the user IDs of the members of a group that the bot is in.

`public getAllGroupMemberIds(string $groupId) : array<string|int, mixed>`

This includes the user IDs of users who have not added the bot as a friend or has blocked the bot. This method gets all of the members by calling getGroupMemberIds() continually using token

This feature is only available for LINE@ Approved accounts or official accounts.

##### Parameters

$groupId : string

  Identifier of the group

##### Tags

see
  LINEBot::getGroupMemberIds()

##### Return values

array<string|int, mixed> —

memberIds

#### getAllNameListOfUnitsUsedThisMonth()

LINEBot.php : 1393

Get the name list of units used this month for statistics aggregation.

`public getAllNameListOfUnitsUsedThisMonth() : array<string|int, mixed>`

This method gets all of the names by calling getNameListOfUnitsUsedThisMonth() continually using token

##### Return values

array<string|int, mixed> —

#### getAllRoomMemberIds()

LINEBot.php : 456

Gets the user IDs of the members of a room that the bot is in.

`public getAllRoomMemberIds(string $roomId) : array<string|int, mixed>`

This includes the user IDs of users who have not added the bot as a friend or has blocked the bot. This method gets all of the members by calling getRoomMemberIds() continually using token

This feature is only available for LINE@ Approved accounts or official accounts.

##### Parameters

$roomId : string

  Identifier of the room

##### Tags

see
  LINEBot::getRoomMemberIds()

##### Return values

array<string|int, mixed> —

memberIds

#### getAudience()

LINEBot.php : 1223

Get audience

`public getAudience(int $audienceGroupId) : Response`

##### Parameters

$audienceGroupId : int

  The audience ID.

##### Return values

Response —

#### getAudiences()

LINEBot.php : 1240

Get data for multiple audiences

`public getAudiences(int $page[, int $size = 20 ][, string|null $description = null ][, string|null $status = null ][, bool|null $includesExternalPublicGroups = null ][, string|null $createRoute = null ]) : Response`

##### Parameters

$page : int

  The page to return when getting (paginated) results. Must be 1 or higher.

$size : int = 20

  The number of audiences per page. Max: 40

$description : string|null = null

  You can search for partial matches.

$status : string|null = null

  One of: IN_PROGRESS, READY, FAILED, EXPIRED

$includesExternalPublicGroups : bool|null = null
$createRoute : string|null = null

  How the audience was created. One of: OA_MANAGER, MESSAGING_API

##### Return values

Response —

#### getAuthorityLevel()

LINEBot.php : 1272

Get the authority level of the audience

`public getAuthorityLevel() : Response`

##### Return values

Response —

#### getBotInfo()

LINEBot.php : 82

Get basic information about bot.

`public getBotInfo() : Response`

##### Return values

Response —

#### getChannelAccessToken21Keys()

LINEBot.php : 983

Get all valid channel access token key IDs v2.1

`public getChannelAccessToken21Keys(string $jwt) : Response`

##### Parameters

$jwt : string

##### Return values

Response —

#### getDefaultRichMenuId()

LINEBot.php : 578

Get the default rich menu ID.

`public getDefaultRichMenuId() : Response`

##### Return values

Response —

#### getFollowerIds()

LINEBot.php : 109

Gets the list of User IDs of users who have added your LINE Official Account as a friend.

`public getFollowerIds([string|null $start = null ]) : Response`

These users' IDs won't be included in the obtained list of user IDs:

- Users who blocked the target LINE Official Account after adding it as a friend.
- Users who haven't consented to their profile information being obtained.

This feature is only available for LINE@ Approved accounts or official accounts.

##### Parameters

$start : string|null = null

  continuationToken

##### Return values

Response —

#### getFriendDemographics()

LINEBot.php : 866

Get friend demographics

`public getFriendDemographics() : Response`

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.

##### Return values

Response —

#### getGroupMemberIds()

LINEBot.php : 396

Gets the user IDs of the members of a group that the bot is in.

`public getGroupMemberIds(string $groupId[, string|null $start = null ]) : Response`

This includes the user IDs of users who have not added the bot as a friend or has blocked the bot.

This feature is only available for LINE@ Approved accounts or official accounts.

##### Parameters

$groupId : string

  Identifier of the group

$start : string|null = null

  continuationToken

##### Return values

Response —

#### getGroupMemberProfile()

LINEBot.php : 366

Gets the user profile of a member of a group that the bot is in.

`public getGroupMemberProfile(string $groupId, string $userId) : Response`

This can be the user ID of a user who has not added the bot as a friend or has blocked the bot.

##### Parameters

$groupId : string

  Identifier of the group

$userId : string

  Identifier of the user

##### Return values

Response —

#### getGroupMembersCount()

LINEBot.php : 492

Gets the count of members in a group

`public getGroupMembersCount(string $groupId) : Response`

The number returned excludes the LINE Official Account.

##### Parameters

$groupId : string

  Group ID

##### Return values

Response —

#### getGroupSummary()

LINEBot.php : 478

Get group summary

`public getGroupSummary(string $groupId) : Response`

Gets the group ID, group name, and group icon URL of a group where the LINE Official Account is a member.

##### Parameters

$groupId : string

  Group ID

##### Return values

Response —

#### getMessageContent()

LINEBot.php : 148

Gets message content which is associated with specified message ID.

`public getMessageContent(string $messageId) : Response`

##### Parameters

$messageId : string

  The message ID to retrieve content.

##### Return values

Response —

#### getNameListOfUnitsUsedThisMonth()

LINEBot.php : 1374

Get the name list of units used this month for statistics aggregation.

`public getNameListOfUnitsUsedThisMonth([string|null $limit = null ][, int|null $start = null ]) : Response`

##### Parameters

$limit : string|null = null
$start : int|null = null

##### Return values

Response —

#### getNarrowcastProgress()

LINEBot.php : 1044

Get Narrowcast message sending progress.

`public getNarrowcastProgress(string $requestId) : Response`

##### Parameters

$requestId : string

##### Return values

Response —

#### getNumberOfFollowers()

LINEBot.php : 850

Get number of followers

`public getNumberOfFollowers(DateTime $datetime) : Response`

##### Parameters

$datetime : DateTime

  Date for which to retrieve the number of followers.

##### Return values

Response —

#### getNumberOfLimitForAdditional()

LINEBot.php : 159

Gets the target limit for additional messages in the current month.

`public getNumberOfLimitForAdditional() : Response`

##### Return values

Response —

#### getNumberOfMessageDeliveries()

LINEBot.php : 837

Get number of message deliveries

`public getNumberOfMessageDeliveries(DateTime $datetime) : Response`

##### Parameters

$datetime : DateTime

  Date for which to retrieve number of sent messages.

##### Return values

Response —

#### getNumberOfSentBroadcastMessages()

LINEBot.php : 824

Get number of sent broadcast messages

`public getNumberOfSentBroadcastMessages(DateTime $datetime) : Response`

##### Parameters

$datetime : DateTime

  Date the messages were sent.

##### Return values

Response —

#### getNumberOfSentMulticastMessages()

LINEBot.php : 811

Get number of sent multicast messages

`public getNumberOfSentMulticastMessages(DateTime $datetime) : Response`

##### Parameters

$datetime : DateTime

  Date the messages were sent.

##### Return values

Response —

#### getNumberOfSentPushMessages()

LINEBot.php : 798

Get number of sent push messages

`public getNumberOfSentPushMessages(DateTime $datetime) : Response`

##### Parameters

$datetime : DateTime

  Date the messages were sent.

##### Return values

Response —

#### getNumberOfSentReplyMessages()

LINEBot.php : 785

Get number of sent reply messages

`public getNumberOfSentReplyMessages(DateTime $datetime) : Response`

##### Parameters

$datetime : DateTime

  Date the messages were sent.

##### Return values

Response —

#### getNumberOfSentThisMonth()

LINEBot.php : 169

Gets the number of messages sent in the current month.

`public getNumberOfSentThisMonth() : Response`

##### Return values

Response —

#### getNumberOfUnitsUsedThisMonth()

LINEBot.php : 1362

Get the number of aggregation units used this month.

`public getNumberOfUnitsUsedThisMonth() : Response`

##### Return values

Response —

#### getProfile()

LINEBot.php : 93

Gets specified user's profile through API calling.

`public getProfile(string $userId) : Response`

##### Parameters

$userId : string

  The user ID to retrieve profile.

##### Return values

Response —

#### getRichMenu()

LINEBot.php : 530

Gets a rich menu via a rich menu ID.

`public getRichMenu(string $richMenuId) : Response`

##### Parameters

$richMenuId : string

  ID of an uploaded rich menu

##### Return values

Response —

#### getRichMenuAlias()

LINEBot.php : 763

Get rich menu alias information

`public getRichMenuAlias(string $richMenuAliasId) : Response`

##### Parameters

$richMenuAliasId : string

  The rich menu alias ID whose information you want to obtain.

##### Return values

Response —

#### getRichMenuAliasList()

LINEBot.php : 774

Get list of rich menu alias

`public getRichMenuAliasList() : Response`

##### Return values

Response —

#### getRichMenuId()

LINEBot.php : 601

Gets the ID of the rich menu linked to a user.

`public getRichMenuId(string $userId) : Response`

##### Parameters

$userId : string

  User ID. Found in the source object of webhook event objects.

##### Return values

Response —

#### getRichMenuList()

LINEBot.php : 710

Gets a list of all uploaded rich menus.

`public getRichMenuList() : Response`

##### Return values

Response —

#### getRoomMemberIds()

LINEBot.php : 413

Gets the user IDs of the members of a room that the bot is in.

`public getRoomMemberIds(string $roomId[, string|null $start = null ]) : Response`

This includes the user IDs of users who have not added the bot as a friend or has blocked the bot.

This feature is only available for LINE@ Approved accounts or official accounts.

##### Parameters

$roomId : string

  Identifier of the room

$start : string|null = null

  continuationToken

##### Return values

Response —

#### getRoomMemberProfile()

LINEBot.php : 380

Gets the user profile of a member of a room that the bot is in.

`public getRoomMemberProfile(string $roomId, string $userId) : Response`

This can be the user ID of a user who has not added the bot as a friend or has blocked the bot.

##### Parameters

$roomId : string

  Identifier of the room

$userId : string

  Identifier of the user

##### Return values

Response —

#### getRoomMembersCount()

LINEBot.php : 506

Gets the count of members in a room

`public getRoomMembersCount(string $roomId) : Response`

The number returned excludes the LINE Official Account.

##### Parameters

$roomId : string

  Room ID

##### Return values

Response —

#### getUserInteractionStatistics()

LINEBot.php : 882

Get user interaction statistics

`public getUserInteractionStatistics(string $requestId) : Response`

Returns statistics about how users interact with broadcast messages sent from your LINE official account. Interactions are tracked for only 14 days after a message was sent. The statistics are no longer updated after 15 days.

##### Parameters

$requestId : string

  Request ID of broadcast message.

##### Return values

Response —

#### getUserInteractionStatisticsPerUnit()

LINEBot.php : 1348

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

`public getUserInteractionStatisticsPerUnit(string $customAggregationUnit, string $from, string $to) : Response`

##### Parameters

$customAggregationUnit : string

  Name of aggregation unit

$from : string

  Start date of aggregation period

$to : string

  End date of aggregation period

##### Return values

Response —

#### getWebhookEndpointInfo()

LINEBot.php : 1307

Get webhook endpoint information

`public getWebhookEndpointInfo() : Response`

##### Return values

Response —

#### leaveGroup()

LINEBot.php : 314

Leaves from group.

`public leaveGroup(string $groupId) : Response`

##### Parameters

$groupId : string

  Identifier of group to leave.

##### Return values

Response —

#### leaveRoom()

LINEBot.php : 325

Leaves from room.

`public leaveRoom(string $roomId) : Response`

##### Parameters

$roomId : string

  Identifier of room to leave.

##### Return values

Response —

#### linkRichMenu()

LINEBot.php : 614

Links a rich menu to a user. Only one rich menu can be linked to a user at one time.

`public linkRichMenu(string $userId, string $richMenuId) : Response`

##### Parameters

$userId : string

  User ID. Found in the source object of webhook event objects.

$richMenuId : string

  ID of an uploaded rich menu

##### Return values

Response —

#### multicast()

LINEBot.php : 265

Sends arbitrary message to multi destinations.

`public multicast(array<string|int, mixed> $tos, MessageBuilder $messageBuilder[, bool $notificationDisabled = false ][, string|null $retryKey = null ][, array<string|int, mixed> $customAggregationUnits = array() ]) : Response`

##### Parameters

$tos : array<string|int, mixed>

  Identifiers of destination.

$messageBuilder : MessageBuilder

  Message builder to send.

$notificationDisabled : bool = false

  Don't send push notifications(=true) or send(=false)

$retryKey : string|null = null

  UUID(example: 123e4567-e89b-12d3-a456-426614174000) or Not needed retry(=null)

$customAggregationUnits : array<string|int, mixed> = array()

  Name of aggregation unit.

##### Return values

Response —

#### parseEventRequest()

LINEBot.php : 340

Parse event request to Event objects.

`public parseEventRequest(string $body, string $signature[, bool $eventOnly = true ]) : mixed`

##### Parameters

$body : string

  Request body.

$signature : string

  Signature of request.

$eventOnly : bool = true

  if this flag on, get events only.

##### Tags

throws
  InvalidEventRequestException
throws
  InvalidSignatureException

##### Return values

mixed —

#### pushMessage()

LINEBot.php : 233

Sends arbitrary message to destination.

`public pushMessage(string $to, MessageBuilder $messageBuilder[, bool $notificationDisabled = false ][, string|null $retryKey = null ][, array<string|int, mixed> $customAggregationUnits = array() ]) : Response`

##### Parameters

$to : string

  Identifier of destination.

$messageBuilder : MessageBuilder

  Message builder to send.

$notificationDisabled : bool = false

  Don't send push notifications(=true) or send(=false)

$retryKey : string|null = null

  UUID(example: 123e4567-e89b-12d3-a456-426614174000) or Not needed retry(=null)

$customAggregationUnits : array<string|int, mixed> = array()

  Name of aggregation unit.

##### Return values

Response —

#### renameAudience()

LINEBot.php : 1196

Rename an audience

`public renameAudience(int $audienceGroupId, string $description) : Response`

##### Parameters

$audienceGroupId : int

  The audience ID.

$description : string

  The audience's name. Max character limit: 120

##### Return values

Response —

#### replyMessage()

LINEBot.php : 181

Replies arbitrary message to destination which is associated with reply token.

`public replyMessage(string $replyToken, MessageBuilder $messageBuilder) : Response`

##### Parameters

$replyToken : string

  Identifier of destination.

$messageBuilder : MessageBuilder

  Message builder to send.

##### Return values

Response —

#### replyText()

LINEBot.php : 208

Replies text message(s) to destination which is associated with reply token.

`public replyText(string $replyToken, string $text[, array<string|int, string>|null $extraTexts = null ]) : Response`

This method receives variable texts. It can send text(s) message as bulk.

Exact signature of this method is `replyText(string $replyToken, string $text, string[] $extraTexts)`.

Means, this method can also receive multiple texts like so;

`$bot->replyText('reply-text', 'text', 'extra text1', 'extra text2', ...)`

##### Parameters

$replyToken : string

  Identifier of destination.

$text : string

  Text of message.

$extraTexts : array<string|int, string>|null = null

  Extra text of message.

##### Tags

throws
  ReflectionException

##### Return values

Response —

#### revokeChannelAccessToken()

LINEBot.php : 921

Revoke channel access token

`public revokeChannelAccessToken(string $channelAccessToken) : Response`

Revokes a channel access token.

##### Parameters

$channelAccessToken : string

##### Return values

Response —

#### revokeChannelAccessToken21()

LINEBot.php : 963

Revoke channel access token v2.1

`public revokeChannelAccessToken21(string $channelId, string $channelSecret, string $channelAccessToken) : Response`

##### Parameters

$channelId : string
$channelSecret : string
$channelAccessToken : string

##### Return values

Response —

#### sendNarrowcast()

LINEBot.php : 1005

Send Narrowcast message.

`public sendNarrowcast(MessageBuilder $messageBuilder[, RecipientBuilder|null $recipientBuilder = null ][, DemographicFilterBuilder|null $demographicFilterBuilder = null ][, int|null $max = null ][, string|null $retryKey = null ][, mixed $upToRemainingQuota = false ]) : Response`

##### Parameters

$messageBuilder : MessageBuilder
$recipientBuilder : RecipientBuilder|null = null
$demographicFilterBuilder : DemographicFilterBuilder|null = null
$max : int|null = null
$retryKey : string|null = null

  UUID(example: 123e4567-e89b-12d3-a456-426614174000) or Not needed retry(=null)

$upToRemainingQuota : mixed = false

##### Return values

Response —

#### setDefaultRichMenuId()

LINEBot.php : 567

Set the default rich menu.

`public setDefaultRichMenuId(string $richMenuId) : Response`

##### Parameters

$richMenuId : string

  ID of an uploaded rich menu

##### Return values

Response —

#### setWebhookEndpoint()

LINEBot.php : 1318

Set webhook endpoint URL

`public setWebhookEndpoint(string $endpoint) : Response`

##### Parameters

$endpoint : string

##### Return values

Response —

#### testWebhookEndpoint()

LINEBot.php : 1331

Checks if the configured webhook endpoint can receive a test webhook event

`public testWebhookEndpoint(string $endpoint) : Response`

##### Parameters

$endpoint : string

##### Return values

Response —

#### unlinkRichMenu()

LINEBot.php : 647

Unlinks a rich menu from multiple user.

`public unlinkRichMenu(string $userId) : Response`

##### Parameters

$userId : string

  User ID. Found in the source object of webhook event objects.

##### Return values

Response —

#### updateAudienceGroupForUploadingUserIds()

LINEBot.php : 1114

Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs

`public updateAudienceGroupForUploadingUserIds(int $audienceGroupId, array<string|int, mixed> $audiences[, string|null $uploadDescription = null ]) : Response`

##### Parameters

$audienceGroupId : int

  The audience ID.

$audiences : array<string|int, mixed>

  An array of up to 10,000 user IDs or IFAs.

$uploadDescription : string|null = null

  The description to register with the job.

##### Return values

Response —

#### updateAudienceGroupForUploadingUserIdsByFile()

LINEBot.php : 1137

Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by file)

`public updateAudienceGroupForUploadingUserIdsByFile(int $audienceGroupId, string $filePath[, string|null $uploadDescription = null ]) : Response`

##### Parameters

$audienceGroupId : int

  The audience ID.

$filePath : string

  A text file path with one user ID or IFA entered per line. Max number: 1,500,000

$uploadDescription : string|null = null

  The description to register with the job.

##### Return values

Response —

#### updateAuthorityLevel()

LINEBot.php : 1283

Change the authority level of the audience

`public updateAuthorityLevel(string $authorityLevel) : Response`

##### Parameters

$authorityLevel : string

  One of: PUBLIC, PRIVATE

##### Return values

Response —

#### updateRichMenuAlias()

LINEBot.php : 749

Update rich menu alias

`public updateRichMenuAlias(string $richMenuAliasId, string $richMenuId) : Response`

##### Parameters

$richMenuAliasId : string

  The rich menu alias ID whose information you want to obtain.

$richMenuId : string

  The rich menu ID to be associated with the rich menu alias.

##### Return values

Response —

#### uploadRichMenuImage()

LINEBot.php : 692

Uploads and attaches an image to a rich menu.

`public uploadRichMenuImage(string $richMenuId, string $imagePath, string $contentType) : Response`

Notes:

- Images must have one of the following resolutions: 2500x1686 or 2500x843 pixels.
- 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.

##### Parameters

$richMenuId : string

  ID of an uploaded rich menu

$imagePath : string

  Path to the image

$contentType : string

  image/jpeg or image/png

##### Return values

Response —

#### validateSignature()

LINEBot.php : 353

Validate request with signature.

`public validateSignature(string $body, string $signature) : bool`

##### Parameters

$body : string

  Request body.

$signature : string

  Signature of request.

##### Tags

throws
  InvalidSignatureException

##### Return values

bool —

Request is valid or not.

## Search results