Skip to main content
The LINE chat integration lets you send messages to subscribers who have added your LINE Official Account as a friend. Novu uses the LINE Messaging API push endpoint with a Channel Access Token configured on the integration, and a LINE user ID stored on each subscriber’s channel endpoint. Supported message types:
  • Text — default workflow chat step content
  • Flex Message — rich layouts via trigger overrides
  • Image — image messages via trigger overrides
  • Sticker — sticker messages via trigger overrides

Configure a LINE Messaging API channel

Before connecting LINE in Novu, create a Messaging API channel in the LINE Developers Console and issue a Channel Access Token.
1

Open the LINE Developers Console

Go to the LINE Developers Console and sign in.
2

Create a provider and channel

Create a provider (if you do not have one), then create a Messaging API channel for your LINE Official Account.
3

Issue a Channel Access Token

Open your channel, go to the Messaging API tab, and issue a Channel access token (long-lived). Copy the token — you will paste it into Novu.
4

Enable webhooks (recommended)

On the same tab, enable Use webhook if you plan to capture subscriber LINE user IDs from follow or message events. Set the webhook URL to your backend endpoint that creates line_user channel endpoints in Novu.See LINE’s docs on getting user IDs for details.
Push messages can only be delivered to users who have added your LINE Official Account as a friend.

Configure LINE integration in Novu

1

Open Integrations Store

In the Novu Dashboard, click Integrations Store in the sidebar.
2

Connect LINE

Click Connect Provider, select Chat, then choose LINE.
3

Add credentials

Paste your Channel Access Token from the LINE Developers Console and click Create Integration.

Connect subscribers

Each subscriber needs a LINE user ID (for example, U1234567890abcdef) so Novu knows where to deliver messages. Create a line_user channel endpoint for the subscriber using the channel endpoints API.
import { Novu } from '@novu/api';

const novu = new Novu({
  secretKey: '<NOVU_SECRET_KEY>',
  // Required if using EU region
  // serverURL: 'https://eu.api.novu.co',
});

await novu.channelEndpoints.create({
  subscriberId: 'subscriberId',
  integrationIdentifier: 'line-<integration-id>',
  type: 'line_user',
  endpoint: {
    userId: '<LINE_USER_ID>',
  },
});
See the Create a channel endpoint API reference for full request details.
Push messages can only be delivered to users who have added your LINE Official Account as a friend. Capture the LINE user ID from follow or message webhook events, then register it as a line_user channel endpoint.

Send notifications

Create a workflow with a Chat step, add your message content, and trigger the workflow for a subscriber that has a line_user channel endpoint configured.
import { Novu } from '@novu/api';

const novu = new Novu({
  secretKey: '<NOVU_SECRET_KEY>',
});

await novu.trigger({
  workflowId: 'order-shipped',
  to: {
    subscriberId: 'subscriberId',
  },
  payload: {
    orderId: 'ORD-12345',
  },
});
The chat step content is sent as a plain text LINE message unless you override the message type at trigger time.

Rich message types

Pass flex, image, or sticker under overrides.chat when triggering a workflow. When present, Novu sends that message type instead of plain text.
await novu.trigger({
  workflowId: 'order-shipped',
  to: { subscriberId: 'subscriberId' },
  payload: {},
  overrides: {
    chat: {
      sticker: {
        packageId: '1',
        stickerId: '1',
      },
    },
  },
});
Image URLs must be direct HTTPS links to JPEG or PNG files. Redirects and unsupported formats may cause delivery failures. See LINE’s message types documentation for payload requirements.