> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifly.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Send LINE messages

> Connect a LINE Official Account to an eligible Notifly project and set up LINE campaigns and user journeys.

> [!WARNING]
>
> Only eligible Notifly projects can send LINE messages. If LINE doesn't appear under **Settings > Channel Settings**, email [contact@notifly.tech](mailto:contact@notifly.tech) to check availability for your plan and the country or region of your LINE Official Account.

Before you send LINE messages with Notifly:

1. Create a LINE Official Account.
2. In LINE Official Account Manager, enable Messaging API and confirm that the channel appears in the LINE Developers Console.

> [!NOTE]
>
> Check LINE's account setup and verification requirements for the country or region where your business operates. See [Get started with the Messaging API](https://developers.line.biz/en/docs/messaging-api/getting-started/).

## 1. Register a LINE channel

Open **Settings > Channel Settings**. In the LINE settings, click **Register Channel**.

![Register Channel button in Notifly's LINE settings](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/line/line-setting-empty.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=95c4208657a35c6eb3c4618137896612)

### 1-1. Enter the channel details

1. Sign in to the [LINE Developers Console](https://developers.line.biz/console/).
2. In the **Basic settings** tab, find the channel ID and channel secret and enter them in Notifly.

* **LINE Channel ID**. The unique identifier for the LINE channel.
* **LINE Channel Secret**. The secret for the Messaging API channel.

![Basic settings tab in the LINE Developers Console](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/line/line-developers-basic.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=4c5af188234853e8bff3044e8e640e00)

3. In the **Messaging API** tab, find the channel access token and your Basic ID or Premium ID and enter them in Notifly.

* **LINE Channel Access Token**. Enter the channel access token.
* **LINE Basic ID (Premium ID)**. Enter your Basic ID or Premium ID. Users can search for this ID to add your account as a friend. You can also use it to create an add-friend link.

![Messaging API settings in the LINE Developers Console](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/line/line-developers-messaging-api.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=b4cf9ecef3bd76a4c82f83c1d42136c6)

![LINE channel registration form](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/line/line-channel-register-example.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=b163dd43fee26c566d90297821320bd3)

> [!WARNING]
>
> You can register one LINE channel per project. If you need to connect multiple channels, contact support.

### 1-2. Check the connection

Click **Register** after entering your channel details. Notifly uses the LINE API to verify the connection.

* If the connection succeeds, the console shows **LINE Channel Registered** and opens the webhook setup. You can use the channel in campaigns and user journeys.
* If the connection fails, check the error details. Verify the channel ID, channel secret, and access token in the LINE Developers Console.

## 2. Set up the LINE webhook

LINE uses a webhook to report when a user adds your LINE Official Account as a friend, blocks it, or unblocks it. Set up the webhook so Notifly can keep track of these changes.

### 2-1. Set the webhook URL

If your server already receives LINE webhooks, keep its URL and go to section 2-2 to set up forwarding. If you're setting up a webhook for the first time, follow the steps below.

1. Open your channel's **Messaging API** tab in the LINE Developers Console.
2. In **Webhook URL**, enter the following Notifly endpoint and save it.
   ```
   https://integration.notifly.tech/line/webhook
   ```
3. Turn on **Use webhook**.

![LINE webhook settings](https://mintcdn.com/notifly/k_Kav6NL3EkvIkR_/ko/user-guide/images/user-guide/line/line_developers_webhook_settings.png?fit=max\&auto=format\&n=k_Kav6NL3EkvIkR_\&q=85\&s=044c7e8974c0a6eb10646f4626beb10d)

4. Click **Verify** and check for a success message.

![LINE webhook verification](https://mintcdn.com/notifly/k_Kav6NL3EkvIkR_/ko/user-guide/images/user-guide/line/line_webhook_test.png?fit=max\&auto=format\&n=k_Kav6NL3EkvIkR_\&q=85\&s=8de3d2d47260dbd27092b425e80f1ea3)

### 2-2. If you already use a webhook

Keep your current server as the webhook endpoint in LINE. Verify the LINE signature there. Then send a POST request to `https://integration.notifly.tech/line/webhook` with the unmodified request body and the original `x-line-signature` header. Do not parse and reserialize the body before forwarding it. Continue sending the events to your existing system.

## 3. Save each recipient's LINE user ID

Notifly sends LINE messages using each recipient's LINE user ID. Save the ID through a Notifly SDK, the HTTP API, or a CSV upload.

### 3-1. Integrate LINE Login into your service

Before integrating LINE Login, check that the LINE Login and Messaging API channels are under the same provider in the LINE Developers Console. The same LINE user has a different ID under each provider. See [how LINE issues user IDs](https://developers.line.biz/en/docs/messaging-api/getting-user-ids/#user-id-issuance-unit).

1. Implement LINE Login in your app or website.
2. When login succeeds, capture the user ID returned by LINE.
3. Pass the ID to the Notifly SDK or HTTP API as the `$line_user_id` user property.

> [!NOTE]
>
> For help adding LINE Login to your app or site, see the [LINE Login developer documentation](https://developers.line.biz/en/docs/line-login/).

### 3-2. Add a LINE user ID from the user list or through a CSV upload

1. Open the user list in the Notifly console and choose to add users or upload a CSV.
2. For CSV uploads, add a `$line_user_id` column.
3. Enter the corresponding LINE user ID in each row.

> [!WARNING]
>
> Notifly excludes users with an empty `$line_user_id` from LINE sends.\
> You can associate one LINE user ID per user.

## 4. Create a LINE message template

You can reuse a saved LINE message template in campaigns and user journeys.

1. In the Notifly console, open the message settings for a LINE campaign or user journey.
2. Select **Line** as the campaign channel.
3. Under **LINE Message Type**, select **Text** and enter the message body in **Message Content**.
4. To reuse the message, click **Save as Template**. In the new tab, enter a **Template Name** and click **Save**.

The LINE message preview to the right of the editor updates as you type.

![LINE message editor](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/line/line-campaign-example.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=88bdf83c3a5e6014d33cc116c6b50b4f)

> [!NOTE]
>
> This editor doesn't support:
>
> * LINE emoji and sticker messages
> * Mention tags
> * Template messages, Flex Messages, coupons, and rich menus

## 5. Send a test message

1. Get the test recipient's LINE user ID.
2. In a campaign, click **Send Test**. In a user journey message node, click **Test Send**.
3. In the dialog, enter the recipient's LINE user ID and click **Send**.
4. Check that the message arrives in the LINE app.

![LINE test send dialog with a LINE user ID field](https://mintcdn.com/notifly/0_mniRtlC78csfem/images/i18n/en/line/line-test-send.png?fit=max\&auto=format\&n=0_mniRtlC78csfem\&q=85\&s=0576a5e43b56a73b7f1556a015bc94eb)

## 6. Set the send timing and audience

LINE supports scheduled, event-triggered, and API-triggered sends. Use a user group for scheduled or event-triggered campaigns. Scheduled campaigns also support CSV audiences. For API-triggered campaigns, specify recipients in the request.

See [Campaign send timing](https://docs.notifly.tech/en/user-guide/campaigns/basic.md#2-delivery-timing) and [Set up a user group](https://docs.notifly.tech/en/user-guide/campaigns/campaign-segments/segment.md#1-user-group-settings).

Notifly skips recipients who have no LINE user ID or are recorded as having blocked the LINE Official Account. If Notifly has no record of the recipient's friend or block status, it can still attempt to send.

## 7. View statistics and reports

Find LINE message statistics in the campaign details and user journey reports.

* Send requests (`send_success`): The number of recipients in requests the LINE API accepted.
* Send failures (`send_failure`): The number of recipients Notifly couldn't send to. An invalid token or request, or a rate limit, can cause a send to fail.

> [!WARNING]
>
> LINE Messaging API can return HTTP 200 even when the recipient has blocked the account or hasn't added it as a friend. In these cases, the message may never reach the user.

## 8. Billing

Notifly counts each recipient in a request that the LINE API accepts (`send_success`) toward your message usage. Ask your customer success manager about your project's rates and billing terms.

> [!NOTE]
>
> You pay any LINE Official Account fees directly to LINE. LINE counts messages against your Official Account plan's allowance and leaves out recipients who can't receive the message. See [LINE Messaging API pricing](https://developers.line.biz/en/docs/messaging-api/pricing/#how-to-count-the-number-of-messages-sent).

## FAQ

> [accordion] Can I connect multiple LINE channels to one project?
>
> You can connect one LINE channel per project. If you run separate LINE channels by country or brand, use separate projects or email [contact@notifly.tech](mailto:contact@notifly.tech) to discuss your setup.

> [accordion] Do I have to configure the LINE webhook?
>
> You can send basic multicast messages without a webhook. Configure the webhook to track when users add your LINE Official Account as a friend, block it, or unblock it.

> [accordion] Why don't I see a Delivered metric in my campaign report?
>
> LINE can accept a multicast request without confirming receipt by each user. Notifly counts recipients in requests that LINE accepted (`send_success`) and in failed sends (`send_failure`). These counts don't show who received the message.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.