linecorp/line-bot-sdk
SDK of the LINE BOT API for PHP
v12.7.0
3.3M downloads/mo
#2546 most downloaded on Packagist
line/line-bot-sdk-php
What this package is like to depend on
Last release 1 months ago
07 Jul 2026
Ships fairly regularly
a new release about every 4 weeks
Rarely documented
notes for 10 of 104 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
104 releases · first in 2016
9 releases in the last 12 months
see the full history below
Release timeline
103 releases · Apr 2016 to Jul 2026Releases
latest 60 of 104-
v12.7.007 Jul 2026Release notes
Open source →What's Changed
- Support Message Edited Webhook by @github-actions[bot] in #865
Support Message Edited Webhook
Add
MessageEditedEventwebhook event to support the message editing feature.When a user edits a message in a group that includes a LINE Official Account, a webhook event with
type=messageEditedis sent.Notes
- Currently, message editing is not available in 1:1 chats with LINE Official Accounts, so this event is only triggered in group chats.
- Multiple
messageEditedwebhook events may arrive out of order. The event with the largesttimestamprepresents the latest edit state.
Please also refer to the document: https://developers.line.biz/en/reference/messaging-api/#edit-event
(original PR is line/line-openapi#129)
Example
use LINE\Webhook\Model\MessageEditedEvent; use LINE\Webhook\Model\TextMessageContent; foreach ($parsedEvents->getEvents() as $event) { if ($event instanceof MessageEditedEvent && $event->getMessage() instanceof TextMessageContent ) { echo "Message {$event->getMessage()->getId()} was edited to: {$event->getMessage()->getText()}"; } }
line-openapi updates
Dependency updates
- chore(deps): update actions/setup-java action to v5.4.0 by @renovate[bot] in #860
- Update junit-framework monorepo to v6.1.1 by @renovate[bot] in #864
Other Changes
- Add and manage guide documentation by @Yang-33 in #858
- Stop managing generated document by @Yang-33 in #859
- Inject missing urls in ToC forcibly by @Yang-33 in #863
Full Changelog: v12.6.0...v12.7.0
This release is prepared by @habara-k
-
v12.6.001 Jul 2026Release notes
Open source →What's Changed
This release supports the new Rich Menu inshgit APIs.
For details on the API, please see below.- https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-insight-summary
- https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-insight-daily
line-openapi updates
- Make body in setRichMenuImage required by @github-actions[bot] in #817
- chore(deps): update line-openapi digest to b9460c9 by @renovate[bot] in #839
- Generate code based on openapi generator 7.23.0 by @github-actions[bot] in #850
- chore(deps): update line-openapi digest to 66fcf8d by @renovate[bot] in #855
- chore(deps): update line-openapi digest to 82f108c by @renovate[bot] in #856
- Support rich menu summary and daily report & remove null from
AudienceGroupFailedTypeemum by @github-actions[bot] in #857
Dependency updates
- chore(deps): update actions/upload-pages-artifact action to v5 by @renovate[bot] in #818
- chore(deps): update actions/github-script action to v9 by @renovate[bot] in #819
- chore(deps): update actions/upload-artifact action to v7.0.1 by @renovate[bot] in #820
- chore(deps): update actions/cache action to v5.0.5 by @renovate[bot] in #822
- chore(deps): update actions/setup-node action to v6.4.0 by @renovate[bot] in #824
- chore(deps): update dependency org.openapitools:openapi-generator-cli to v7.22.0 by @renovate[bot] in #810
- chore(deps): update shivammathur/setup-php action to v2.37.1 by @renovate[bot] in #826
- chore(deps): update actions/stale action to v10.3.0 by @renovate[bot] in #828
- chore(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.11.0 by @renovate[bot] in #830
- chore(deps): update suzuki-shunsuke/pinact-action action to v3 by @renovate[bot] in #834
- chore(deps): update actions/checkout action to v6.0.3 by @renovate[bot] in #836
- chore(deps): update shivammathur/setup-php action to v2.37.2 by @renovate[bot] in #837
- chore(deps): update openapi-generator-version by @renovate[bot] in #843
- chore(deps): update actions/setup-java action to v5.3.0 by @renovate[bot] in #845
- chore(deps): update openapi-generator-version by @renovate[bot] in #849
- chore(deps): update actions/checkout action to v7 by @renovate[bot] in #851
Other Changes
- Revert "chore(deps): update dependency org.openapitools:openapi-generator-cli to v7.22.0" by @Yang-33 in #832
- Revert "chore(deps): update openapi-generator-version" by @Yang-33 in #847
- Use pebble instead of mustache by @Yang-33 in #840
- Use composer check in test job, instead of specifying some commands by @Yang-33 in #842
- Send line-bot-sdk-php's version as user agent by @Yang-33 in #852
- Add form-param regression tests for ChannelAccessToken and ManageAudience by @mokuzon in #823
- Delete unnecessary header and unused tests by @Yang-33 in #853
New Contributors
Full Changelog: v12.5.0...v12.6.0
This release is prepared by @mokuzon
-
v12.5.007 Apr 2026Release notes
Open source →What's Changed
Added feature
This release adds wrapper methods for
ChannelAccessTokenApi#issueStatelessChannelToken, making stateless channel access token issuance simpler for both JWT assertion and client secret authentication. The original method accepts all parameters for two different authentication patterns, making it unclear which to pass for each pattern. These wrappers make the distinction explicit through their names and signatures.- $token = $client->issueStatelessChannelToken( - grantType: 'client_credentials', - clientAssertionType: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', - clientAssertion: $clientAssertion, - ); + $token = $client->issueStatelessChannelTokenByJWTAssertion( + clientAssertion: $clientAssertion, + );
- $token = $client->issueStatelessChannelToken( - grantType: 'client_credentials', - clientId: $channelId, - clientSecret: $channelSecret, - ); + $token = $client->issueStatelessChannelTokenByClientSecret( + clientId: $channelId, + clientSecret: $channelSecret, + );
line-openapi updates
- chore(deps): update line-openapi digest to c601805 by @renovate[bot] in #802
- chore(deps): update line-openapi digest to 982bad2 by @renovate[bot] in #809
Dependency updates
- chore(deps): update actions/setup-node action to v6.2.0 by @renovate[bot] in #785
- chore(deps): update actions/checkout action to v6.0.2 by @renovate[bot] in #786
- chore(deps): update actions/cache action to v5.0.2 by @renovate[bot] in #787
- chore(deps): update actions/cache action to v5.0.3 by @renovate[bot] in #790
- chore(deps): update suzuki-shunsuke/pinact-action action to v1.4.0 by @renovate[bot] in #791
- chore(deps): update actions/stale action to v10.2.0 by @renovate[bot] in #793
- chore(deps): update dependency phpunit/phpunit to v11 - abandoned by @renovate[bot] in #655
- chore(deps): update actions/upload-artifact action to v7 by @renovate[bot] in #796
- chore(deps): update actions/setup-node action to v6.3.0 by @renovate[bot] in #797
- chore(deps): update ramsey/composer-install action to v3.2.0 by @renovate[bot] in #798
- chore(deps): update shivammathur/setup-php action to v2.37.0 by @renovate[bot] in #799
- chore(deps): update ramsey/composer-install action to v3.2.1 by @renovate[bot] in #800
- chore(deps): update ramsey/composer-install action to v4 by @renovate[bot] in #801
- chore(deps): update actions/cache action to v5.0.4 by @renovate[bot] in #803
- chore(deps): update suzuki-shunsuke/pinact-action action to v2 by @renovate[bot] in #805
- chore(deps): update actions/setup-java action to v4.8.0 by @renovate[bot] in #807
- chore(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.10.0 by @renovate[bot] in #808
- chore(deps): update actions/setup-java action to v5 by @renovate[bot] in #811
- chore(deps): update actions/configure-pages action to v6 by @renovate[bot] in #812
- chore(deps): update actions/deploy-pages action to v5 by @renovate[bot] in #813
Other Changes
- refactor: add type hints to parser library and Laravel facades by @Ayoub-Mabrouk in #772
- Drop PHP 8.1 by @eucyt in #794
- Docs: Update PHP_CodeSniffer repository link by @rodrigoprimo in #804
- Manage config to run openapi generator in one file by @eucyt in #806
- Add test for verifyChannelTokenByJWT and getsAllValidChannelAccessTokenKeyIds by @Yang-33 in #816
- docs: improve documentation generation instructions by @Ayoub-Mabrouk in #789
- Modify CONTRIBUTING.md about generating code by @Yang-33 in #815
New Contributors
- @Ayoub-Mabrouk made their first contribution in #772
- @rodrigoprimo made their first contribution in #804
Full Changelog: v12.4.0...v12.5.0
This release is prepared by @habara-k
-
v12.4.021 Jan 2026Release notes
Open source →What's Changed
- Add new AudienceGroupType TRACKINGTAG_WEBTRAFFIC to Audience Group API by @github-actions[bot] in #784
Add
TRACKINGTAG_WEBTRAFFICto AudienceGroupType EnumWe have supported for the new audience‑group type
TRACKINGTAG_WEBTRAFFIC(Tracking Tag Webtraffic audience) to the OpenAPI schema.Changes Made
-
Updated
AudienceGroupTypeenumeration- New value:
TRACKINGTAG_WEBTRAFFIC - Description: Audience groups generated from Tracking Tag Webtraffic.
- New value:
Purpose
This update enables correct identification and handling of audience groups built from Tracking Tag Webtraffric.
Documents and Reference
For more information, please refer to the links provided above.
(original PR is line/line-openapi#118)
line-openapi updates
- chore(deps): update line-openapi digest to f406009 by @renovate[bot] in #767
- Codes are generated by openapi generator by @github-actions[bot] in #783
Dependency updates
- chore(deps): update dependency squizlabs/php_codesniffer to v4.0.1 by @renovate[bot] in #758
- chore(deps): update actions/checkout action to v5.0.1 by @renovate[bot] in #760
- chore(deps): update actions/checkout action to v6 by @renovate[bot] in #761
- chore(deps): update shivammathur/setup-php action to v2.36.0 by @renovate[bot] in #763
- chore(deps): update actions/checkout action to v6.0.1 by @renovate[bot] in #764
- chore(deps): update actions/stale action to v10.1.1 by @renovate[bot] in #765
- chore(deps): update actions/setup-node action to v6.1.0 by @renovate[bot] in #766
- chore(deps): update actions/cache action to v5 by @renovate[bot] in #768
- chore(deps): update actions/upload-artifact action to v6 by @renovate[bot] in #770
- chore(deps): update actions/cache action to v5.0.1 by @renovate[bot] in #769
- chore(deps): update suzuki-shunsuke/pinact-action action to v1.0.1 by @renovate[bot] in #774
- chore(deps): update suzuki-shunsuke/pinact-action action to v1.1.0 by @renovate[bot] in #776
- chore(deps): update suzuki-shunsuke/pinact-action action to v1.2.0 by @renovate[bot] in #778
- chore(deps): update suzuki-shunsuke/pinact-action action to v1.3.0 by @renovate[bot] in #780
- chore(deps): update suzuki-shunsuke/pinact-action action to v1.3.1 by @renovate[bot] in #782
Other Changes
Full Changelog: v12.3.0...v12.4.0
This release is prepared by @eucyt
-
v12.3.007 Nov 2025Release notes
Open source →What's Changed
- Support mark as read by token API by @github-actions[bot] in #757
Support for "Mark as Read" by Token API
We have released a new Mark as Read API that allows developers to mark a user’s messages as read.
Previously, this functionality was available only to partners, but it is now publicly available.When your server receives a user message via Webhook, the
MessageContentwill include a new field:markAsReadToken.
By calling the Mark as Read API with this token, all messages in the chat room up to and including that message will be marked as read.Note: This feature assumes that your service uses the chat feature through Official Account Manager.
If chat is not enabled, messages from users are automatically marked as read, making this API unnecessary.For more details, please refer to the release note: https://developers.line.biz/en/news/2025/11/05/mark-as-read/
(original PR is line/line-openapi#115)
Example
$bot->markAsReadByToken(new MarkAsReadByTokenRequest([ 'markAsReadToken' => $message->markAsReadToken, ]))
line-openapi updates
Dependency updates
Other Changes
- Remove Things examples by @eucyt in #754
- Update documents and examples to use the constructor which sets the discriminator value automatically by @eucyt in #755
Full Changelog: v12.2.0...v12.3.0
This release is prepared by @habara-k
-
v12.2.031 Oct 2025Release notes
Open source →What's Changed
Previously, when creating a polymorphic model, you have to set the discriminator value manually each time, even though the value is obvious.
$message = (new TextMessage()) ->setType(\LINE\Constants\MessageType::TEXT) // this is redundant. ->setText('hello!');
With this release, the discriminator value will be automatically set in the constructor.
$message = (new TextMessage()) ->setText('hello!'); $this->assertEquals('text', $message->getType()); // Passed
Dependency updates
Full Changelog: v12.1.0...v12.2.0
This release is prepared by @eucyt
-
v12.1.023 Oct 2025Release notes
Open source →What's Changed
- Add forbidPartialDelivery option to the Narrowcast Limit Object by @github-actions[bot] in #750
Add forbidPartialDelivery option to the Narrowcast Limit Object
We add a new
forbidPartialDeliveryoption to the Narrowcast Limit Object.When set to true, this option prevents messages from being delivered to only a subset of the target audience.
If partial delivery occurs, the narrowcast request will succeed but fail asynchronously.
You can verify whether the message delivery was canceled by checking the narrowcast message progress.This property can only be set to true when upToRemainingQuota is also true.
For more details, see the https://developers.line.biz/en/news/2025/10/21/narrowcast-message-update/.
Example:
$bot->narrowcast(new NarrowcastRequest([ 'messages' => [ (new TextMessage(['text' => 'Hello']))->setType('text'), ], 'limit' => new Limit([ 'max' => 1000, 'upToRemainingQuota' => true, 'forbidPartialDelivery' => true ]) ]))
(original PR is line/line-openapi#114)
Use cases
Previously, when
upToRemainingQuotawas set totrue, messages could be partially delivered if the remaining message quota was smaller than the target audience size.
With the newforbidPartialDeliveryoption, you can now ensure that such partial deliveries do not occur.- Ensuring that a campaign message is sent only if it can reach the full target audience, avoiding incomplete distributions.
line-openapi updates
Full Changelog: v12.0.0...v12.1.0
This release is prepared by @habara-k
-
v12.0.022 Oct 2025Release notes
Open source →What's Changed
This change introduces polymorphism support in API responses.
⚠️ This includes breaking changes.As-Is
Polymorphic types in responses were not handled correctly.
As a result, all responses were deserialized into the base class, making it impossible to access subclass-specific properties.$api = new MessagingApiApi($client); $richMenuListResponse = $api->getRichMenuList(); // Even if type=postback, it becomes an instance of Action, not PostbackAction $action = $richMenuListResponse->getRichmenus()[0]->getAreas()[0]->getAction(); // Error: Call to undefined method LINE\Clients\MessagingApi\Model\Action::getData() $data = $action->getData(); // or simply null $data = $action["data"];
To-Be
Polymorphic types in responses are now properly supported.
Each response is deserialized into the correct subclass, allowing subclass properties to be accessed safely.This change applies to all API responses, not just this specific endpoint.
If your existing code depends on the base class types, you will need to update it accordingly.
You can now directly access subclass-specific properties when polymorphism is involved.When the discriminator is unknown, it is deserialized into the parent class, and no error occurs.
$api = new MessagingApiApi($client); $richMenuListResponse = $api->getRichMenuList(); // If type=postback, it will now become an instance of PostbackAction $action = $richMenuListResponse->getRichmenus()[0]->getAreas()[0]->getAction(); // You can now access subclass-specific properties $data = $action->getData(); $data = $action["data"];
Full Changelog: v11.4.0...v12.0.0
This release is prepared by @eucyt
-
v11.4.021 Oct 2025Release notes
Open source →What's Changed
With this release, developers can now optionally skip signature verification when parsing incoming webhook requests. This new capability is especially useful in scenarios where the channel secret may change, potentially causing temporary signature mismatches.
Example Usage:
$options = new EventRequestOptions(function () { return true; }); $parsedEvents = EventRequestParser::parseEventRequest( $req->getBody(), $secret, $signature[0], $options );
When signature verification is skipped, the signatureValidator will not be invoked. This allows webhook requests to be processed even if their signatures do not match the current channel secret used for verification.
This feature is particularly helpful in high-availability systems where avoiding downtime or message loss during configuration updates is critical.
Dependency updates
- chore(deps): update dependency squizlabs/php_codesniffer to v3.13.4 by @renovate[bot] in #734
- chore(deps): update actions/github-script action to v7.1.0 by @renovate[bot] in #735
- chore(deps): update actions/github-script action to v8 by @renovate[bot] in #736
- chore(deps): update actions/setup-node action to v5 by @renovate[bot] in #737
- chore(deps): update actions/stale action to v10 by @renovate[bot] in #738
- chore(deps): update dependency squizlabs/php_codesniffer to v4 by @renovate[bot] in #742
- chore(deps): update shivammathur/setup-php action to v2.35.5 by @renovate[bot] in #744
- chore(deps): update actions/cache action to v4.3.0 by @renovate[bot] in #745
- chore(deps): update actions/stale action to v10.1.0 by @renovate[bot] in #747
- chore(deps): update actions/setup-node action to v6 by @renovate[bot] in #749
Other Changes
- Set minimumReleaseAge to 7 days to avoid merge renovate PR quickly by @Yang-33 in #739
- Use github actor id instead of bot name to avoid renaming issues by @Yang-33 in #740
- Prevent command injection when creating release notes by @Yang-33 in #748
New Contributors
Full Changelog: v11.3.0...v11.4.0
-
v11.3.025 Aug 2025Release notes
Open source →What's Changed
Support new AudienceGroupType POP_AD_IMP to Audience Group API
- Add new AudienceGroupType POP_AD_IMP to Audience Group API by @github-actions[bot] in #731
We have supported for the new audience‑group type
POP_AD_IMP(POP ad impression audience) to the OpenAPI schema.Changes Made
-
Updated
AudienceGroupTypeenumeration- New value:
POP_AD_IMP - Description: Audience groups generated from impressions of LINE Beacon Network (POP) ads.
- Region: Taiwan‑only at launch
- New value:
Purpose
This update enables correct identification and handling of audience groups built from POP ad impressions, a feature that will be released for the Taiwan market.
Documents and Reference
For more information, please refer to the links provided above.
(original PR is line/line-openapi#113)
Dependency updates
Other Changes
Full Changelog: v11.2.1...v11.3.0
This release is prepared by @eucyt
Release notes
Open source →2021/03/01
The UI of LIFF apps opened in LINE v11.3.0 will change.
-
Toast displayed during LIFF-to-LIFF transition will change
-
LIFF apps will be displayed in a modal window in LINE for iPadOS
Toast displayed during LIFF-to-LIFF transition will change
In LINE v11.3.0, the toast displayed during "LIFF-to-LIFF transitions," where users can transition to another LIFF app without closing the LIFF app opened in the LIFF browser, will change. This change makes it easier for users to identify the destination LIFF app.
The design of the toast differs between Android and iOS. The figure below shows an example of a toast when using an iPhone.
Changes Supported OS LINE v11.2.x and earlier LINE v11.3.0
Message*
-
iOS
-
Android Switched to another app. Switched to the {LIFF app name} app. **
Display location iOS only*** Center of screen Bottom of screen
- Toast messages are displayed in multiple languages according to LINE's language settings, but {LIFF app name} will be displayed in the language it was entered as.
** The {LIFF app name} section displays the app name specified in the LIFF app name section of the LIFF tab in the LINE Developers Console .
*** LINE v11.2.0 and earlier for Android will also display the toast at the bottom of the screen.
For more information about LIFF-to-LIFF transitions, see Opening a LIFF app from another LIFF app in the LIFF documentation.
LIFF apps will be displayed in a modal window in LINE for iPadOS
In LINE v11.3.0, to improve the experience with LIFF apps designed for many portrait modes (portrait display), LIFF apps opened on the iPad will be displayed in a formSheet size (540W x 620H pt) modal window.
Regardless of the Size setting ( Compact , Tall , or Full ) specified in the LIFF tab of the LINE Developers Console , LIFF apps will always be displayed in a formSheet size modal window in LINE v11.3.0 on iPad.
Example of a LIFF app with the screen size set to Compact :
About the screen ratio in landscape mode (landscape view)
formSheet will be displayed in portrait mode screen ratio (540W x 620H pt) even in landscape mode (landscape display).
LIFF
Previous post [Resolved] Notice about service outage for LINE Login Next post [Updated] Replace (Backward compatibility mode) has been removed from the permanent link redirect settings of the LIFF app and LINE MINI App
-
v11.2.112 Aug 2025Nothing published for this version
-
v11.2.006 Aug 2025Nothing published for this version
-
v11.1.124 Apr 2025Nothing published for this version
-
v11.1.021 Apr 2025Nothing published for this version
-
v11.0.127 Mar 2025Nothing published for this version
-
v11.0.026 Mar 2025Nothing published for this version
-
v10.3.013 Mar 2025Nothing published for this version
-
v10.2.110 Mar 2025Nothing published for this version
-
v10.2.013 Feb 2025Nothing published for this version
-
v10.1.012 Feb 2025Nothing published for this version
-
v10.0.323 Jan 2025Nothing published for this version
-
v10.0.220 Jan 2025Nothing published for this version
-
v10.0.115 Jan 2025Nothing published for this version
-
v10.0.026 Dec 2024Nothing published for this version
-
9.12.007 Nov 2024Nothing published for this version
-
9.11.005 Sep 2024Nothing published for this version
-
9.10.026 Aug 2024Nothing published for this version
-
9.9.122 Jul 2024Nothing published for this version
-
9.9.017 Apr 2024Nothing published for this version
-
9.8.003 Apr 2024Nothing published for this version
-
9.7.102 Apr 2024Nothing published for this version
-
9.7.006 Feb 2024Nothing published for this version
-
9.6.105 Feb 2024Nothing published for this version
-
9.6.017 Jan 2024Nothing published for this version
-
9.5.027 Dec 2023Nothing published for this version
-
9.4.425 Dec 2023Nothing published for this version
-
9.4.325 Dec 2023Nothing published for this version
-
v9.4.225 Dec 2023Nothing published for this version
-
9.4.1no dateNothing published for this version
-
9.4.025 Dec 2023Nothing published for this version
-
9.3.015 Sep 2023Nothing published for this version
-
9.2.006 Sep 2023Nothing published for this version
-
9.1.023 Aug 2023Nothing published for this version
-
9.0.001 Aug 2023Nothing published for this version
-
8.1.007 Jul 2023Nothing published for this version
-
8.0.018 May 2023Nothing published for this version
-
7.6.117 Oct 2022Nothing published for this version
-
7.6.019 Aug 2022Nothing published for this version
-
7.5.017 May 2022Nothing published for this version
-
7.4.011 May 2022Nothing published for this version
-
7.3.128 Jan 2022Nothing published for this version
-
7.3.019 Nov 2021Nothing published for this version
-
7.2.021 Sep 2021Nothing published for this version
-
7.1.021 Jul 2021Nothing published for this version
-
7.0.011 Mar 2021Nothing published for this version
-
6.3.011 Mar 2021Nothing published for this version
-
6.2.008 Feb 2021Nothing published for this version
-
6.1.010 Dec 2020Nothing published for this version
-
6.0.016 Oct 2020Nothing published for this version
-
5.1.014 Oct 2020Nothing published for this version