Skip to content

Releases: line/line-bot-sdk-nodejs

v11.2.0 Support Message Edited Webhook

Choose a tag to compare

@github-actions github-actions released this 07 Jul 08:50
Immutable release. Only release title and notes can be modified.
7ce0902

What's Changed

  • Support Message Edited Webhook by @github-actions[bot] in #1710

Support Message Edited Webhook

Add MessageEditedEvent webhook 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=messageEdited is 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 messageEdited webhook events may arrive out of order. The event with the largest timestamp represents 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

import { webhook } from "@line/bot-sdk";

function handleEvent(event: webhook.Event) {
  if (event.type !== "messageEdited") return;
  if (event.message.type !== "text") return;

  console.log(`edited: ${event.message.id} -> ${event.message.text}`);
}

line-openapi updates

  • Format by prettier 3.9.0 by @github-actions[bot] in #1707

Dependency updates

Full Changelog: v11.1.0...v11.2.0


This release is prepared by @habara-k

v11.1.0 Support rich menu summary API and daily report API

Choose a tag to compare

@github-actions github-actions released this 01 Jul 07:35
Immutable release. Only release title and notes can be modified.
4c0c9f3

What's Changed

This release supports the new Rich Menu inshgit APIs.
line/line-openapi#128

  • Rich Menu summary
    • Retrieves aggregate statistics for the specified period, such as the number of users who viewed the rich menu and how many times it was viewed. The aggregation process of these statistics is usually completed within the next day.
  • Rich Menu daily report
    • Retrieves daily statistics for the specified period, such as the number of users who viewed the rich menu and how many times it was viewed. The aggregation process of these statistics is usually completed within the next day.

For details on the API, please see below.

line-openapi updates

  • Update line-openapi digest to 82f108c by @renovate[bot] in #1685
  • Support rich menu summary and daily report & remove null from AudienceGroupFailedType emum by @github-actions[bot] in #1689

Dependency updates

Other Changes

Full Changelog: v11.0.2...v11.1.0


This release is prepared by @mokuzon

v11.0.2 Add missing developers.line.biz urls

Choose a tag to compare

@github-actions github-actions released this 18 Jun 02:38
Immutable release. Only release title and notes can be modified.
bd70c78

What's Changed

  • Add missing developers.line.biz urls by @github-actions[bot] in #1661

Some classes have developers.line.biz url, but others don't have it. This change adds missing urls.
Developer can get the latest information from the documentation, and search related information.

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

line-openapi updates

  • Fix document in revokeChannelToken by @github-actions[bot] in #1657

Dependency updates

  • Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.6 by @renovate[bot] in #1638
  • Update suzuki-shunsuke/pinact-action action to v3 by @renovate[bot] in #1640
  • Update dependency oxc-minify to ^0.133.0 by @renovate[bot] in #1641
  • Update npm tool constraint to v11.16.0 by @renovate[bot] in #1642
  • Update dependency @arethetypeswrong/cli to v0.18.3 by @renovate[bot] in #1645
  • Update dependency io.pebbletemplates:pebble to v4.1.2 by @renovate[bot] in #1646
  • Update dependency oxc-minify to ^0.134.0 by @renovate[bot] in #1648
  • Update vitest monorepo to v4.1.8 by @renovate[bot] in #1647
  • Update actions/checkout action to v6.0.3 by @renovate[bot] in #1649
  • Update dependency typedoc-plugin-markdown to v4.12.0 by @renovate[bot] in #1650
  • Update dependency @types/node to v24.13.0 by @renovate[bot] in #1651
  • Update dependency @types/node to v24.13.1 by @renovate[bot] in #1652
  • Update dependency oxc-minify to ^0.135.0 by @renovate[bot] in #1654
  • Update openapi-generator-version to v7.23.0 by @renovate[bot] in #1655
  • Update dependency prettier to v3.8.4 by @renovate[bot] in #1658

Other Changes

Full Changelog: v11.0.1...v11.0.2


This release is prepared by @Yang-33

v11.0.1 Fix type and path traversal bug

Choose a tag to compare

@github-actions github-actions released this 28 May 04:12
Immutable release. Only release title and notes can be modified.
51b7af2

What's Changed

We've fixes 2 trivial bugs.

  1. Make body in setRichMenuImage required by @github-actions[bot] in #1582
    • body as richmenu image was nullable but actually it's required.
  2. Prevent path traversal by @Yang-33 in #1630
    • malicious input is no longer accepted.

And we support Node.js 26, and drop Node.js 20 Support because it was EOL: https://nodejs.org/ja/about/eol

  • Add Node.js 26 support and Drop Node.js 20 support by @Yang-33 in #1600

Dependency updates

Other Changes

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


This release is prepared by @Yang-33

v11.0.0 Drop deprecated code and axios dependency

Choose a tag to compare

@github-actions github-actions released this 03 Apr 14:19
Immutable release. Only release title and notes can be modified.
2e2b556

What's Changed

Breaking change

v11 removes the legacy Client, OAuth, and their associated legacy types.

Since v8.0.0, the @line/bot-sdk has provided fetch-based API clients, while continuing to keep the older axios-based APIs for compatibility.
In v10.8.0, those legacy APIs were deprecated.

How to migrate

If you still use the legacy APIs, please prepare for v11 by first upgrading to v10.8.0.
v10.8.0 includes both the new code and the deprecated code, so you can migrate there first and then upgrade to v11.

If you already migrated to the generated clients introduced in v8.0.0, the impact should be small.
Those APIs are not planned for removal in v11.

LineBotClient is also available as a unified client(better clients than v8.0.0) for the main bot APIs, but the main breaking change in v11 is the removal of the legacy API surface.

For migration details, see the Migration Guide, and v10.8.0 release note.

Drop dependency

v11 also reduces the dependency footprint to almost zero: the only remaining package dependency is @types/node, and the optional axios dependency has been removed.

Main Changes

Full Changelog: v10.8.0...v11.0.0


This release is prepared by @Yang-33

v10.8.0 Transitional release for v11, add unified client

Choose a tag to compare

@github-actions github-actions released this 03 Apr 13:51
Immutable release. Only release title and notes can be modified.
5fbec98

Overview

v10.8.0 is a transitional release for v11.
It is intended to help you prepare for the breaking changes in v11 before upgrading.

The main points are:

  • If you still use the legacy Client, OAuth, or old types, v11 is a breaking change.
  • If you already migrated to the generated clients introduced in v8, the impact should be small.
  • LineBotClient is a new convenience client. It is useful, but it is not the main breaking change in v11.
  • v11 minimizes external dependencies. For example, axios is deleted. Only @types/node is kept.

Before upgrading to v11, first upgrade to v10.8.0.

npm install --ignore-scripts @line/bot-sdk@10.8.0 # just in case

v10.8.0 includes both the legacy API and the new API, so you can migrate incrementally.

For this release note:

  • The legacy API available through v10.8.0 is referred to as "v10".
  • The new API released in v11.0.0 and later is referred to as "v11".

The main breaking change in v11 is the removal of the legacy API surface.
The legacy Client and OAuth classes are removed, along with their associated legacy types.

New users should use v11.
If you are still on the legacy API, we recommend migrating through v10.8.0 and then upgrading to v11.

What changes for users

If you still use Client / OAuth

This is the main migration case.

In v11, the following legacy APIs are removed:

  • Client
  • OAuth
  • legacy types that were tied to those APIs

If your code still depends on them, you need to migrate before upgrading to v11.

If you already use the generated clients introduced in v8

The impact should be small.

v11 continues the same generated-client direction introduced in v8.
If you already use APIs such as:

  • messagingApi.MessagingApiClient
  • messagingApi.MessagingApiBlobClient
  • manageAudience.ManageAudienceClient
  • insight.InsightClient
  • liff.LiffClient

then v11 should feel familiar. You don't have to do anything if you library from v8.0.0.

About new LineBotClient

LineBotClient is a new unified client for the main bot APIs.

It wraps:

  • Messaging API
  • Insight API
  • LIFF API
  • Manage Audience API
  • Shop API
  • Module API

This makes client setup simpler, but it is mainly a convenience feature.
It is not the main source of breaking changes in v11.

Only channel access token operations remain separate under channelAccessToken.ChannelAccessTokenClient.

import { LineBotClient } from "@line/bot-sdk";

const client = LineBotClient.fromChannelAccessToken({
  channelAccessToken: "YOUR_CHANNEL_ACCESS_TOKEN",
});

If you prefer, you can continue using clients from v8.0.0 directly.


Migration Guide

You can migrate in stages.

Step 1: Upgrade to v10.8.0

npm install --ignore-scripts @line/bot-sdk@10.8.0 # just in case

v10.8.0 includes both the legacy API and the new API, so you can migrate incrementally before moving to v11.

Step 2: Replace deprecated code

Deprecated classes and methods are marked with @deprecated JSDoc comments that point to the replacement API.

Example:

/**
 * @deprecated Use {@link LineBotClient.pushMessage} instead.
 */

Client construction

// Before
import { Client } from "@line/bot-sdk";

const client = new Client({
  channelAccessToken: "...",
});

// After
import { LineBotClient } from "@line/bot-sdk";

const client = LineBotClient.fromChannelAccessToken({
  channelAccessToken: "...",
});

Method call example

// Before
await client.pushMessage(to, messages);

// After
await client.pushMessage({ to, messages });

The same applies to OAuth.
It is deprecated, and the replacement is channelAccessToken.ChannelAccessTokenClient.

Step 3: Upgrade to v11

Once you have removed all deprecated code, upgrade to v11.

npm install @line/bot-sdk@11

Starting with v11, the legacy Client, OAuth, and related types are no longer included.


Detailed migration reference

For full migration details, see:

Examples

Example projects for the new API are available here:

Feedback & Contributions

We welcome feedback and contributions.

Actual changes

Full Changelog: v10.7.0...v10.8.0

v10.7.0 Add wrapper method for ChannelAccessTokenClient#issueStatelessChannelToken

Choose a tag to compare

@github-actions github-actions released this 03 Apr 12:43
Immutable release. Only release title and notes can be modified.
3106a02

What's Changed

Added feature

This release adds wrapper methods for ChannelAccessTokenClient#issueStatelessChannelToken , making stateless channel access token issuance simpler for both JWT assertion and client secret authentication. With this release, you don't have to pass undefined.

- const token = await client.issueStatelessChannelToken(
-   "client_credentials",
-   "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
-   clientAssertion,
-   undefined,
-   undefined,
- );
+ const token = await client.issueStatelessChannelTokenByJWTAssertion(
+   clientAssertion,
+ );
- const token = await client.issueStatelessChannelToken(
-   "client_credentials",
-   undefined,
-   undefined,
-   channelId,
-   channelSecret,
- );
+ const token = await client.issueStatelessChannelTokenByClientSecret(
+   channelId,
+   channelSecret,
+ );
  • Implement wrapper method of issue_stateless_channel_token by @habara-k in #1568

Bug fix

ChannelAccessTokenClient#verifyChannelTokenByJWT and ChannelAccessTokenClient#getsAllValidChannelAccessTokenKeyIds were broken for long time. This release fixes it.

  • Fix broken channel access token APIs in new client by @Yang-33 in #1569

line-openapi updates

  • chore(deps): update line-openapi digest to c601805 by @renovate[bot] in #1552
  • chore(deps): update line-openapi digest to 982bad2 by @renovate[bot] in #1570

Dependency updates

  • chore(deps): update dependency prettier to v3.8.0 by @renovate[bot] in #1503
  • chore(deps): update actions/setup-node action to v6.2.0 by @renovate[bot] in #1504
  • chore(deps): update actions/checkout action to v6.0.2 by @renovate[bot] in #1505
  • chore(deps): update dependency @types/node to v24.10.9 by @renovate[bot] in #1506
  • fix(deps): update openapi-generator-version to v7.19.0 by @renovate[bot] in #1507
  • chore(deps): update dependency prettier to v3.8.1 by @renovate[bot] in #1508
  • chore(deps): update actions/setup-java action to v5.2.0 by @renovate[bot] in #1509
  • chore(deps): update dependency axios to v1.13.3 by @renovate[bot] in #1510
  • chore(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.15.0 by @renovate[bot] in #1511
  • chore(deps): update dependency axios to v1.13.4 by @renovate[bot] in #1512
  • chore(deps): update suzuki-shunsuke/pinact-action action to v1.4.0 by @renovate[bot] in #1515
  • chore(deps): update dependency axios to v1.13.5 [security] by @renovate[bot] in #1516
  • chore(deps): update dependency @types/node to v24.10.10 by @renovate[bot] in #1518
  • chore(deps): update dependency msw to v2.12.8 by @renovate[bot] in #1519
  • fix(deps): update dependency io.pebbletemplates:pebble to v4.1.1 by @renovate[bot] in #1520
  • chore(deps): update dependency @types/node to v24.10.11 by @renovate[bot] in #1521
  • chore(deps): update dependency msw to v2.12.9 by @renovate[bot] in #1523
  • chore(deps): update dependency typedoc-plugin-markdown to v4.10.0 by @renovate[bot] in #1524
  • chore(deps): update dependency @types/node to v24.10.12 by @renovate[bot] in #1525
  • chore(deps): update actions/stale action to v10.2.0 by @renovate[bot] in #1527
  • chore(deps): update dependency @types/node to v24.10.13 by @renovate[bot] in #1529
  • chore(deps): update dependency msw to v2.12.10 by @renovate[bot] in #1530
  • chore(deps): update dependency typedoc to v0.28.17 by @renovate[bot] in #1531
  • chore(deps): update junit-framework monorepo to v6.0.3 by @renovate[bot] in #1532
  • fix(deps): update openapi-generator-version to v7.20.0 by @renovate[bot] in #1533
  • chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.5 by @renovate[bot] in #1534
  • chore(deps): update dependency @types/node to v24.10.14 by @renovate[bot] in #1539
  • chore(deps): update dependency @types/node to v24.10.15 by @renovate[bot] in #1540
  • chore(deps): update dependency axios to v1.13.6 by @renovate[bot] in #1541
  • chore(deps): update dependency @types/node to v24.11.0 by @renovate[bot] in #1542
  • chore(deps): update dependency org.apache.maven.plugins:maven-shade-plugin to v3.6.2 by @renovate[bot] in #1543
  • chore(deps): update actions/setup-node action to v6.3.0 by @renovate[bot] in #1544
  • chore(deps): update dependency @types/node to v24.11.2 by @renovate[bot] in #1545
  • chore(deps): update dependency @types/node to v24.12.0 by @renovate[bot] in #1546
  • chore(deps): update dependency msw to v2.12.11 by @renovate[bot] in #1548
  • chore(deps): update dependency msw to v2.12.13 by @renovate[bot] in #1550
  • chore(deps): update dependency typedoc-plugin-markdown to v4.11.0 by @renovate[bot] in #1554
  • chore(deps): update dependency msw to v2.12.14 by @renovate[bot] in #1557
  • chore(deps): update suzuki-shunsuke/pinact-action action to v2 by @renovate[bot] in #1558
  • chore(deps): update dependency typedoc to v0.28.18 by @renovate[bot] in #1559
  • chore(deps): update actions/deploy-pages action to v5 by @renovate[bot] in #1566
  • chore(deps): update actions/configure-pages action to v6 by @renovate[bot] in #1565
  • fix(deps): update openapi-generator-version to v7.21.0 by @renovate[bot] in #1564

Other Changes

  • Bump qs from 6.14.1 to 6.14.2 in /examples/echo-bot-ts-esm by @dependabot[bot] in #1522
  • Bump qs from 6.14.1 to 6.14.2 in /examples/echo-bot-ts-cjs by @dependabot[bot] in #1526
  • Bump qs from 6.14.1 to 6.14.2 in /examples/echo-bot-esm by @dependabot[bot] in #1528
  • Extract URLSearchParams creation to reusable helper by @Ayoub-Mabrouk in #1477
  • Bump rollup from 4.38.0 to 4.59.0 by @dependabot[bot] in #1535
  • Bump minimatch from 9.0.5 to 9.0.9 in /examples/echo-bot-ts-cjs by @dependabot[bot] in #1536
  • Bump minimatch from 9.0.5 to 9.0.9 in /examples/echo-bot-ts-esm by @dependabot[bot] in #1538
  • chore(deps): update dependency msw to v2.12.12 by @renovate[bot] in #1549
  • Update dependencies to resolve vulnerabilities by @eucyt in #1551
  • Bump picomatch from 4.0.2 to 4.0.4 by @dependabot[bot] in #1555
  • Disable lifecycle script to avoid supply chain attack by @Yang-33 in #1567

Full Changelog: v10.6.0...v10.7.0


This release is prepared by @Yang-33

v10.6.0 Support new AudienceGroupType TRACKINGTAG_WEBTRAFFIC to Audience Group API

Choose a tag to compare

@github-actions github-actions released this 21 Jan 11:23
Immutable release. Only release title and notes can be modified.
7d98240

What's Changed

  • Add new AudienceGroupType TRACKINGTAG_WEBTRAFFIC to Audience Group API by @github-actions[bot] in #1502

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 line/line-openapi#118)

line-openapi updates

Dependency updates

Other Changes

New Contributors

Full Changelog: v10.5.0...v10.6.0


This release is prepared by @eucyt

v10.5.0 Support mark as read by token API

Choose a tag to compare

@github-actions github-actions released this 07 Nov 08:14
Immutable release. Only release title and notes can be modified.
75abd94

What's Changed

  • Support mark as read by token API by @github-actions[bot] in #1443

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 line/line-openapi#115)

Example

client.markMessagesAsReadByToken({
  markAsReadToken: event.message.markAsReadToken
})

line-openapi updates

Dependency updates

Other Changes

Full Changelog: v10.4.0...v10.5.0


This release is prepared by @habara-k

v10.4.0 Add forbidPartialDelivery option to the Narrowcast Limit Object

Choose a tag to compare

@github-actions github-actions released this 24 Oct 02:08
Immutable release. Only release title and notes can be modified.
a255221

What's Changed

  • Add forbidPartialDelivery option to the Narrowcast Limit Object by @github-actions[bot] in #1430

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:
client.narrowcast(
  {
    messages: [{ type: 'text', text: 'Hello' }],
    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

Dependency updates

  • Update dependency @types/node to v22.18.5 by @renovate[bot] in #1406
  • Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.14.1 by @renovate[bot] in #1408
  • Update openapi-generator-version to v7.16.0 by @renovate[bot] in #1411
  • Update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.6.2 by @renovate[bot] in #1412
  • Update junit-framework monorepo to v5.14.0 by @renovate[bot] in #1413
  • Update junit-framework monorepo to v6 (major) by @renovate[bot] in #1414
  • Update dependency @types/node to v22.18.8 by @renovate[bot] in #1407
  • Update dependency typedoc-plugin-markdown to v4.9.0 by @renovate[bot] in #1409
  • Update dependency msw to v2.11.3 by @renovate[bot] in #1410
  • Update dependency typescript to v5.9.3 by @renovate[bot] in #1415
  • Update actions/stale action to v10.1.0 by @renovate[bot] in #1418
  • Update actions/setup-node action to v6 by @renovate[bot] in #1424
  • Update dependency typedoc to v0.28.14 by @renovate[bot] in #1422
  • Update dependency @types/node to v22.18.10 by @renovate[bot] in #1421
  • Update dependency msw to v2.11.5 by @renovate[bot] in #1420

Other Changes

Full Changelog: v10.3.0...v10.4.0


This release is prepared by @habara-k