Skip to content

Releases: line/line-bot-sdk-php

v12.1.0 Add forbidPartialDelivery option to the Narrowcast Limit Object

24 Oct 02:07
Immutable release. Only release title and notes can be modified.
7f7122f

Choose a tag to compare

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 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/.

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 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.

  • 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.0 Support polymorphism in response deserialization

22 Oct 06:46
Immutable release. Only release title and notes can be modified.
b4b857c

Choose a tag to compare

What's Changed

  • Support polymorphism in response deserialization by @eucyt in #746

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.0 Add an Option to Skip Webhook Signature Verification

21 Oct 08:01
Immutable release. Only release title and notes can be modified.
c6d2dc0

Choose a tag to compare

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.0 Support new AudienceGroupType POP_AD_IMP to Audience Group API

26 Aug 01:47
9f857cf

Choose a tag to compare

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 AudienceGroupType enumeration

    • New value: POP_AD_IMP
    • Description: Audience groups generated from impressions of LINE Beacon Network (POP) ads.
    • Region: Taiwan‑only at launch

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

  • chore(deps): update actions/upload-pages-artifact action to v4 by @renovate[bot] in #729

Other Changes

Full Changelog: v11.2.1...v11.3.0


This release is prepared by @eucyt

v11.2.1 Clean up webhook code for line things

13 Aug 01:03
a2a3e30

Choose a tag to compare

What's Changed

LINE Things has been closed. In this release we removed the following LINE Things related webhook code

  • ThingsEvent
  • ThingsContent
  • LinkThingsContent
  • UnlinkThingsContent
  • ScenarioResultThingsContent
  • ScenarioResult
  • ActionResult

As 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.

  • Bye line things by @github-actions[bot] in #727
  • Bye line things by @Yang-33 in #726

Dependency updates

  • chore(deps): update actions/cache action to v4.2.4 by @renovate[bot] in #720
  • chore(deps): update shivammathur/setup-php action to v2.35.3 by @renovate[bot] in #722
  • chore(deps): update dependency node to v22 by @renovate[bot] in #723
  • chore(deps): update actions/checkout action to v4.3.0 by @renovate[bot] in #724
  • chore(deps): update actions/checkout action to v5 by @renovate[bot] in #725

Full Changelog: v11.2.0...v11.2.1


This release is prepared by @Yang-33

v11.2.0 Add Coupon API Support to Messaging API

06 Aug 09:40
180bea9

Choose a tag to compare

What's Changed

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.

✨ New API Endpoints

💬 Messaging API Enhancements

  • Added support for a new message type: type=coupon
    You can now send coupons directly to users using the Messaging API, similar to sending text, image, or template messages.

📌 Example Use Cases

  • Create a 1000 yen off coupon
  • Send the coupon to a user using the new coupon message type

For detailed usage examples, see the official documentation.

📢 Official Announcement:

LINE Developers News — Coupon API Released (2025/08/06)

line-openapi updates

  • chore(deps): update line-openapi digest to 3e09054 by @renovate[bot] in #705
  • chore(deps): update line-openapi digest to 69a12e8 by @renovate[bot] in #707
  • chore(deps): update line-openapi digest to 92f9320 by @renovate[bot] in #709
  • Add Coupon API Support to Messaging API by @github-actions[bot] in #719

Dependency updates

  • chore(deps): update dependency squizlabs/php_codesniffer to v3.13.0 by @renovate[bot] in #706
  • chore(deps): update ramsey/composer-install action to v3.1.1 by @renovate[bot] in #710
  • chore(deps): update shivammathur/setup-php action to v2.34.0 by @renovate[bot] in #711
  • chore(deps): update dependency squizlabs/php_codesniffer to v3.13.1 by @renovate[bot] in #712
  • chore(deps): update shivammathur/setup-php action to v2.34.1 by @renovate[bot] in #713
  • chore(deps): update dependency squizlabs/php_codesniffer to v3.13.2 by @renovate[bot] in #714
  • chore(deps): update shivammathur/setup-php action to v2.35.1 by @renovate[bot] in #717
  • chore(deps): update shivammathur/setup-php action to v2.35.2 by @renovate[bot] in #718

Other Changes

  • Improve issue triage and issue template by @eucyt in #708
  • Update CONTRIBUTING.md to enhance development guidelines by @eucyt in #715
  • Add link to composer.json by @Yang-33 in #716

Full Changelog: v11.1.1...v11.2.0

v11.1.1 Fix type of CreateAudienceGroupResponse#expireTimestamp

24 Apr 11:31
1efb370

Choose a tag to compare

What's Changed

Type for CreateAudienceGroupResponse#expireTimestamp is not float or double, but integer actually. This release fixes type as bugfix.

  • Fix type of expireTimestamp by @github-actions in #704

(original PR is line/line-openapi#106)

line-openapi updates

  • chore(deps): update line-openapi digest to f8dd567 by @renovate in #703

Full Changelog: v11.1.0...v11.1.1


This release is prepared by @Yang-33

v11.1.0 Add includesOwnedAudienceGroups Parameter to Audience API

22 Apr 07:56
5c2000f

Choose a tag to compare

What's Changed

  • Add includesOwnedAudienceGroups Parameter to Audience API by @github-actions in #702

Enhancement to Shared Audiences API

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.

Specifications

  • Added the includesOwnedAudienceGroups parameter to the API endpoint.
    • Type: Boolean
    • Default: false
    • Description:
      • true: Include audience groups owned by the LINE Official Account Manager.
      • false: Respond only with audience groups shared by Business Manager.

Remove deprecated API

  • Removed the /v2/bot/audienceGroup/{audienceGroupId}/activate and /v2/bot/audienceGroup/authorityLevel endpoints.

Documents and Reference

For more information, please refer to the links provided above.

(original PR is line/line-openapi#105)

line-openapi updates

  • Add type as required property in source object of webhook by @github-actions in #697
  • chore(deps): update line-openapi digest to 954b163 by @renovate in #691
  • chore(deps): update line-openapi digest to 0e669d0 by @renovate in #693
  • chore(deps): update line-openapi digest to 31fa3c7 by @renovate in #696

Dependency updates

  • chore(deps): update suzuki-shunsuke/pinact-action action to v0.2.2 by @renovate in #689
  • chore(deps): update suzuki-shunsuke/pinact-action action to v1 by @renovate in #690
  • chore(deps): update dependency squizlabs/php_codesniffer to v3.12.1 by @renovate in #694
  • chore(deps): update dependency squizlabs/php_codesniffer to v3.12.2 by @renovate in #699
  • chore(deps): update actions/setup-node action to v4.4.0 by @renovate in #700
  • chore(deps): update shivammathur/setup-php action to v2.33.0 by @renovate in #701

Other Changes

  • Skip creating PR when only git submodule is updated by @Yang-33 in #688
  • Remove deprecated link by @eucyt in #692
  • Require more jobs in merge queue by @Yang-33 in #695
  • Do not create another auto PR when a job runs for PR or merge queue by @Yang-33 in #698

Full Changelog: v11.0.1...v11.1.0


This release is prepared by @eucyt

v11.0.1 Update parsing Webhook Events

27 Mar 07:05
72a263b

Choose a tag to compare

What's Changed

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.

Other Changes

  • Grant minimum permissions to github acitons workflow jobs by @Yang-33 in #682
  • Delete examples/KitchenSink/.github/workflows/workflow.yml by @Yang-33 in #681
  • Migrate renovate config by @Yang-33 in #685
  • Pin commit hash of github actions to avoid supply chain attacks by @Yang-33 in #680

Full Changelog: v11.0.0...v11.0.1


This release is prepared by @Yang-33

v11.0.0 Update parsing Webhook Events

26 Mar 09:29
98c8815

Choose a tag to compare

What's Changed

How to migrate v10 to v11

This release contains breaking changes related to how Webhook events are parsed. Specifically:

  1. Joined/Left Members
    • Old behavior:
      The members in joined.members or left.members were associative arrays.
    • New behavior:
      They are now properly deserialized into instances of UserSource.
    • Migration:
      Please treat it as a UserSource rather than as an associative array. In addition, this allows you to utilize methods of UserSource for each member. For example, we can still use $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);
  }
}
  1. Default value of message.emojis
    • Old behavior:
      message.emojis were defaulted to empty arrays.
    • New behavior:
      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.
    • Migration:
      Instead of checking whether it's an empty array to determine if the field is present, please check if it's NULL first.

Please update your application code accordingly to handle these changes.

Other changes

  • Add memberJoinedEventHandler in KitchenSink by @eucyt in #678
  • Fix EchoBot DI error to receive messages by @eucyt in #676
  • Fix LocationMessageHandler in example to handle non title or address by @eucyt in #679

line-openapi updates

  • chore(deps): update line-openapi digest to 9dec0f8 by @renovate in #672

Dependency updates

  • chore(deps): update dependency squizlabs/php_codesniffer to v3.12.0 by @renovate in #674

Full Changelog: v10.3.0...v11.0.0


This release is prepared by @eucyt