Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Line Bot Sdk Laravel Package

linecorp/line-bot-sdk

View on GitHub
Deep Wiki
Context7
v12.5.0

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

Dependency updates

Other Changes

New Contributors

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v12.4.0...v12.5.0


This release is prepared by @habara-k

v12.4.0

What's Changed

Add TRACKINGTAG_WEBTRAFFIC to AudienceGroupType Enum

We have supported for the new audience‑group type TRACKINGTAG_WEBTRAFFIC (Tracking Tag Webtraffic audience) to the OpenAPI schema.

Changes Made

  • Updated AudienceGroupType enumeration

    • New value: TRACKINGTAG_WEBTRAFFIC
    • Description: Audience groups generated from Tracking Tag Webtraffic.

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 https://github.com/line/line-openapi/pull/118)

line-openapi updates

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v12.3.0...v12.4.0


This release is prepared by @eucyt

v12.3.0

What's Changed

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

Example

$bot->markAsReadByToken(new MarkAsReadByTokenRequest([
    'markAsReadToken' => $message->markAsReadToken,
]))

line-openapi updates

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v12.2.0...v12.3.0


This release is prepared by @habara-k

v12.2.0

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: https://github.com/line/line-bot-sdk-php/compare/v12.1.0...v12.2.0


This release is prepared by @eucyt

v12.1.0

What's Changed

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 https://github.com/line/line-openapi/pull/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: https://github.com/line/line-bot-sdk-php/compare/v12.0.0...v12.1.0


This release is prepared by @habara-k

v12.0.0

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: https://github.com/line/line-bot-sdk-php/compare/v11.4.0...v12.0.0


This release is prepared by @eucyt

v11.4.0

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

Other Changes

New Contributors

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.3.0...v11.4.0

v11.3.0

What's Changed

Support new AudienceGroupType POP_AD_IMP to Audience Group API

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 https://github.com/line/line-openapi/pull/113)

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.2.1...v11.3.0


This release is prepared by @eucyt

v11.2.1

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.

Dependency updates

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.2.0...v11.2.1


This release is prepared by @Yang-33

v11.2.0

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

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.1.1...v11.2.0

v11.1.1

What's Changed

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)

line-openapi updates

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.1.0...v11.1.1


This release is prepared by @Yang-33

v11.1.0

What's Changed

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 https://github.com/line/line-openapi/pull/105)

line-openapi updates

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.0.1...v11.1.0


This release is prepared by @eucyt

v11.0.1

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

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v11.0.0...v11.0.1


This release is prepared by @Yang-33

v11.0.0

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

line-openapi updates

Dependency updates

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.3.0...v11.0.0


This release is prepared by @eucyt

v10.3.0

Support for PHP 8.4

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.

Deprecated: Implicitly Nullable Parameter

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.

Enhancements in Type Safety

Additionally, several implementations have been refactored for improved type safety. This raised the PHPStan level from 5 to 8.

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.2.1...v10.3.0


This release is prepared by @eucyt

v10.2.1

What's Changed

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.

  1. POST /v2/bot/audienceGroup/upload (createAudienceGroup)
  2. PUT /v2/bot/audienceGroup/upload (addAudienceToAudienceGroup)
  3. POST /v2/bot/audienceGroup/upload/byFile (createAudienceForUploadingUserIds)
  4. POST /v2/bot/audienceGroup/click (createClickBasedAudienceGroup)
  5. 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

v10.2.0

What's Changed

Support new Membership API and Webhook

We have implemented and supported new API and Webhook about Membership.

API to get a list of users who joined the 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

Membership Webhook

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

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)

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.1.0...v10.2.0


This release is prepared by @eucyt

v10.1.0

What's Changed

Add /v2/bot/audienceGroup/shared path by @github-actions in https://github.com/line/line-bot-sdk-php/pull/662

Shared Audiences in Business Manager API Support

We have added and supported new API endpoints related to Shared Audiences in Business Manager.

API to Get Shared Audience Information

You can obtain detailed information about a specific audience shared in Business Manager by calling the endpoint:

  • GET https://api.line.me/v2/bot/audienceGroup/shared/{audienceGroupId}

API to Get List of Shared Audiences

You can acquire a list of audiences shared in Business Manager using the following endpoint:

  • GET https://api.line.me/v2/bot/audienceGroup/shared/list

By using the "Get Shared Audience Information" endpoint, you can retrieve more detailed data about each audience.

Documents and Reference

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

(original PR is https://github.com/line/line-openapi/pull/85)


line-openapi updates

Dependency updates

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.0.3...v10.1.0


This release is prepared by @eucyt

v10.0.3

What's Changed

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)

line-openapi updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.0.2...v10.0.3

v10.0.2

What's Changed

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)

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.0.1...v10.0.2


This release is prepared by @Yang-33

v10.0.1

What's Changed

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

Dependency updates

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/v10.0.0...v10.0.1


This release is prepared by @eucyt

v10.0.0

What's Changed

How to migrate v9 to v10

If 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 -> ClipboardAction
  • use LINE\Clients\MessagingApi\Model\ClipboardActionAllOf; -> use LINE\Clients\MessagingApi\Model\ClipboardAction;

line-openapi updates

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.12.0...v10.0.0


This release is prepared by @Yang-33

9.12.0

What's Changed

Support bot mention features:

line-openapi updates

Dependency updates

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.11.0...9.12.0

9.11.0

What's Changed

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:

  • from50to54
  • from55to59
  • from60to64
  • from65to69
  • from70

Previously, 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

line-openapi updates

Dependency updates

Other Changes

New Contributors

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.9.1...9.10.0

9.10.0

What's Changed

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_55
  • age_60
  • age_65
  • age_70

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

line-openapi updates

Dependency updates

Other Changes

New Contributors

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.9.1...9.10.0

9.9.1

What's Changed

line-openapi updates

Dependency updates

New Contributors

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.9.0...9.9.1

9.9.0

What's Changed

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/

loading-animation 7aad3d6c

https://github.com/line/line-openapi/pull/54

line-openapi updates

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.8.0...9.9.0

9.8.0

What's Changed

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

line-openapi updates

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.7.1...9.8.0

9.7.1

What's Changed

line-openapi updates

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.7.0...9.7.1

9.7.0

What's Changed

line-openapi updates

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.

News: https://developers.line.biz/en/news/2024/02/06/add-friends-and-unblock-friends-can-now-be-determined-by-webhook/

Full Changelog: https://github.com/line/line-bot-sdk-php/compare/9.6.1...9.7.0

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver