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,
+ );
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v12.4.0...v12.5.0
This release is prepared by @habara-k
TRACKINGTAG_WEBTRAFFIC to AudienceGroupType EnumWe have supported for the new audience‑group type TRACKINGTAG_WEBTRAFFIC (Tracking Tag Webtraffic audience) to the OpenAPI schema.
Updated AudienceGroupType enumeration
TRACKINGTAG_WEBTRAFFICThis update enables correct identification and handling of audience groups built from Tracking Tag Webtraffric.
For more information, please refer to the links provided above.
(original PR is https://github.com/line/line-openapi/pull/118)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v12.3.0...v12.4.0
This release is prepared by @eucyt
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 MessageContent will 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 https://github.com/line/line-openapi/pull/115)
$bot->markAsReadByToken(new MarkAsReadByTokenRequest([
'markAsReadToken' => $message->markAsReadToken,
]))
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v12.2.0...v12.3.0
This release is prepared by @habara-k
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
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v12.1.0...v12.2.0
This release is prepared by @eucyt
We add a new forbidPartialDelivery option 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/.
$bot->narrowcast(new NarrowcastRequest([
'messages' => [
(new TextMessage(['text' => 'Hello']))->setType('text'),
],
'limit' => new Limit([
'max' => 1000,
'upToRemainingQuota' => true,
'forbidPartialDelivery' => true
])
]))
(original PR is https://github.com/line/line-openapi/pull/114)
Previously, when upToRemainingQuota was set to true, messages could be partially delivered if the remaining message quota was smaller than the target audience size.
With the new forbidPartialDelivery option, you can now ensure that such partial deliveries do not occur.
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v12.0.0...v12.1.0
This release is prepared by @habara-k
This change introduces polymorphism support in API responses. ⚠️ This includes breaking changes.
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"];
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: https://github.com/line/line-bot-sdk-php/compare/v11.4.0...v12.0.0
This release is prepared by @eucyt
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.
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.3.0...v11.4.0
We have supported for the new audience‑group type POP_AD_IMP (POP ad impression audience) to the OpenAPI schema.
Updated AudienceGroupType enumeration
POP_AD_IMPThis update enables correct identification and handling of audience groups built from POP ad impressions, a feature that will be released for the Taiwan market.
For more information, please refer to the links provided above.
(original PR is https://github.com/line/line-openapi/pull/113)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.2.1...v11.3.0
This release is prepared by @eucyt
LINE Things has been closed. In this release we removed the following LINE Things related webhook code
ThingsEventThingsContentLinkThingsContentUnlinkThingsContentScenarioResultThingsContentScenarioResultActionResultAs noted in the README, deletions tied to a business shutdown are shipped as a patch version, not a major version. If your code still references any of these code, they will never be emitted again, so you should remove them.
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.2.0...v11.2.1
This release is prepared by @Yang-33
This release introduces Coupon API support to the Messaging API, enabling developers to create, manage, and deliver coupons directly through bot integrations. These new features mirror capabilities previously only available through the LINE Official Account Manager, offering greater flexibility in automating coupon workflows via the Messaging API.
POST /v2/bot/coupon
Create a new coupon, including metadata such as title, description, validity period, image URLs, acquisition conditions, and reward details (e.g., fixed-amount discounts).
GET /v2/bot/coupon
Retrieve a list of all coupons associated with your bot.
GET /v2/bot/coupon/{couponId}
Fetch detailed metadata of a specific coupon.
PUT /v2/bot/coupon/{couponId}
Mark a coupon as expired.
type=coupon
You can now send coupons directly to users using the Messaging API, similar to sending text, image, or template messages.For detailed usage examples, see the official documentation.
LINE Developers News — Coupon API Released (2025/08/06)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.1.1...v11.2.0
Type for CreateAudienceGroupResponse#expireTimestamp is not float or double, but integer actually. This release fixes type as bugfix.
(original PR is https://github.com/line/line-openapi/pull/106)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.1.0...v11.1.1
This release is prepared by @Yang-33
Support a new query parameter includesOwnedAudienceGroups to the client.getSharedAudienceGroups (GET /v2/bot/audienceGroup/shared/list). This enhancement allows users to specify whether to include audience groups owned by the user in the response. It is especially useful for users who manage both shared and owned audience groups.
includesOwnedAudienceGroups parameter to the API endpoint.
true: Include audience groups owned by the LINE Official Account Manager.false: Respond only with audience groups shared by Business Manager./v2/bot/audienceGroup/{audienceGroupId}/activate and /v2/bot/audienceGroup/authorityLevel endpoints.For more information, please refer to the links provided above.
(original PR is https://github.com/line/line-openapi/pull/105)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.0.1...v11.1.0
This release is prepared by @eucyt
Note this patch is not related to sdk users. This release is just for our test. See https://github.com/line/line-bot-sdk-php/releases/tag/v11.0.0 about new features.
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.0.0...v11.0.1
This release is prepared by @Yang-33
This release contains breaking changes related to how Webhook events are parsed. Specifically:
$member["userId"] but $member->getUserId(); is recommended.$parsedEvents = EventRequestParser::parseEventRequest($req->getBody(), $secret, $req->getHeader(HTTPHeader::LINE_SIGNATURE)[0]);
foreach ($parsedEvents->getEvents() as $event) {
if ($event instanceof MemberJoinedEvent) {
$joinedMembers = $event->getJoined()->getMembers();
$joinedMemberIds = array_map(function ($member) {
- return $member["userId"];
+ return $member->getUserId();
}, $joinedMembers);
}
}
message.emojis
message.emojis were defaulted to empty arrays.message.emojis were defaulted to NULL as other array fields. This means if the webhook does not contain emojis, the emojis field in the parsed event will now be NULL instead of an empty array.Please update your application code accordingly to handle these changes.
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.3.0...v11.0.0
This release is prepared by @eucyt
We are delighted to announce official support for PHP 8.4. As part of this update, we have addressed changes related to PHP's new deprecations.
Starting from PHP 8.4, the use of implicitly nullable parameters has been deprecated. Thanks to the fixes in OpenAPI Generator version 7.11.0 ( https://github.com/OpenAPITools/openapi-generator/pull/20243 ) by @77web, any occurrence of this deprecated syntax has been removed from the autogenerated files.
- function foo (array $data = null)
+ function foo (array|null $data = null)
For more information on these deprecations, please refer to the PHP 8.4 Migration Guide.
Additionally, several implementations have been refactored for improved type safety. This raised the PHPStan level from 5 to 8.
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.2.1...v10.3.0
This release is prepared by @eucyt
This change modifies the HTTP status code for the following audience group-related endpoints, as they were incorrect. Some http status codes are wrong. They should be 202, not 200.
POST /v2/bot/audienceGroup/upload (createAudienceGroup)PUT /v2/bot/audienceGroup/upload (addAudienceToAudienceGroup)POST /v2/bot/audienceGroup/upload/byFile (createAudienceForUploadingUserIds)POST /v2/bot/audienceGroup/click (createClickBasedAudienceGroup)POST /v2/bot/audienceGroup/imp (createImpBasedAudienceGroup)NOTE: This change is not a modification of the messaging API itself. It is simply a correction of an error in sdk.
(original PR is https://github.com/line/line-openapi/pull/87)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.2.0...v10.2.1
This release is prepared by @Yang-33
We have implemented and supported new API and Webhook about Membership.
You can obtain a list of user IDs for users who have joined the membership of your LINE Official Account by calling client.getJoinedMembershipUsers(...).
Documents: https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids
We have introduced new Webhook events MembershipEvent that indicates that a user has joined, left or renewed a membership of your LINE Official Account.
Documents: https://developers.line.biz/en/reference/messaging-api/#membership-event
For more details, check out the announcement: https://developers.line.biz/en/news/2025/02/13/membership-api/
(original PR is https://github.com/line/line-openapi/pull/86)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.1.0...v10.2.0
This release is prepared by @eucyt
Add /v2/bot/audienceGroup/shared path by @github-actions in https://github.com/line/line-bot-sdk-php/pull/662
We have added and supported new API endpoints related to Shared Audiences in Business Manager.
You can obtain detailed information about a specific audience shared in Business Manager by calling the endpoint:
https://api.line.me/v2/bot/audienceGroup/shared/{audienceGroupId}You can acquire a list of audiences shared in Business Manager using the following endpoint:
https://api.line.me/v2/bot/audienceGroup/shared/listBy using the "Get Shared Audience Information" endpoint, you can retrieve more detailed data about each audience.
For more information, please refer to the links provided above.
(original PR is https://github.com/line/line-openapi/pull/85)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.0.3...v10.1.0
This release is prepared by @eucyt
GET /v2/bot/message/delivery/ad_phone was sunset.
This change removes it as it's no longer necessary to include it in line-openapi.
(original PR is https://github.com/line/line-openapi/pull/82)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.0.2...v10.0.3
The Audience Match feature (/bot/ad/multicast/phone) was sunset in October 2023. This change removes it as it's no longer necessary to include it in line-openapi.
(original PR is https://github.com/line/line-openapi/pull/80)
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.0.1...v10.0.2
This release is prepared by @Yang-33
A new value in "NarrowcastProgressResponse#errrorCode" was defined and comments have been added to the SDK. https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.0.0...v10.0.1
This release is prepared by @eucyt
*AllOf.php are deleted. See in below to understand how to migrate.EventRequestParser to use phpstan@2.0If your application uses any *AllOf.php provided in this repository, please use *.php instead. only changing class name is enough, because they are same internally.
e.g.
MessageEventAllOf -> MessageEvent.use LINE\Webhook\Model\MessageEventAllOf; -> use LINE\Webhook\Model\MessageEvent;ClipboardActionAllOf -> ClipboardActionuse LINE\Clients\MessagingApi\Model\ClipboardActionAllOf; -> use LINE\Clients\MessagingApi\Model\ClipboardAction;Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.12.0...v10.0.0
This release is prepared by @Yang-33
Support bot mention features:
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.11.0...9.12.0
https://github.com/line/line-bot-sdk-php/pull/608
In the Messaging API, we've added the following values as the percentage of each age group of your LINE Official Account's friends that you can get by using the Get friend demographics endpoint:
from50to54from55to59from60to64from65to69from70Previously, we've aggregated the percentage of friends who are 50 and older as a single value, from50. With this change, you can now get statistics on the percentage of friends between the ages of 50 and 70.
We'll continue to include from50 in the response as a value that aggregates the percentage of friends who are 50 and older.
News: https://developers.line.biz/en/news/2024/09/05/age-percentage-subdivision/
https://github.com/line/line-openapi/pull/68
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.9.1...9.10.0
https://github.com/line/line-bot-sdk-php/pull/608 In the Messaging API, we've added the following values as conditions for filtering the age range of recipients in the demographic filter objects of narrowcast messages:
age_55age_60age_65age_70Until now, the upper limit was age_50, so it wasn't possible to filter ages over 50 in detail. By specifying the added age ranges, you can now filter recipients more flexibly than before.
news: https://developers.line.biz/en/news/2024/08/26/age-filter-subdivision/
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.9.1...9.10.0
php artisan vendor:publish command not working in Laravel application by @nick-lai in https://github.com/line/line-bot-sdk-php/pull/600Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.9.0...9.9.1
In the Messaging API, we've added a new endpoint that allows you to display a loading animation. After your LINE Official Account receives a message from a user, the response may takes some time due to message preparation or reservation processing. In such cases, you can visually tell the user that you want them to wait by displaying a loading animation.
news: https://developers.line.biz/en/news/2024/04/17/loading-indicator/
https://github.com/line/line-openapi/pull/54
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.8.0...9.9.0
We're excited to announce that the Membership API is now available in the Messaging API. With this update, our SDK also supports the use of this API. For more details, check out the announcement: https://developers.line.biz/en/news/2024/03/28/re-release-endpoints-for-membership
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.7.1...9.8.0
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.7.0...9.7.1
In the Messaging API, you can now determine whether a user has added your LINE Official Account as a friend or unblocked by a webhook follow event.
Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.6.1...9.7.0
How can I help you explore Laravel packages today?