LINE Messenger

Messenger Partner


LINE, one of the world's most popular instant messaging platforms, is used by millions of highly-engaged users. Through LINE, brands can engage with their customers effectively by providing a rich messaging experience. CleverTap and LINE integration allows you to leverage advanced segmentation, predictive capabilities, personalization, and triggering features. You can message your LINE users the Line messaging API.



This feature is available only for verified or premium LINE accounts. For more information about account types, refer to Account Types of LINE Official Account.

Integrate CleverTap with LINE Messenger

The following are the major steps to perform this integration:

  1. Collect customer LINE IDs.
  2. Save the user's LINE ID on CleverTap.
  3. Save the LINE push message API as a Webhook endpoint in Clevertap.
  4. Create a Campaign to Reach your LINE Followers.

Collect Customer LINE IDs

To send messages in LINE, you need the users' LINE IDs to identify the user and interact with them consistently. LINE IDs are not the same as the userโ€™s LINE usernames. LINE IDs are generated by LINE and can be used when interacting with LINE APIs.
LINE IDs can be obtained using the LINE User ID API. This endpoint returns a list of all the LINE IDs for your contacts on the LINE official account or contacts that have sent you a message and have not blocked you.
When sending a GET request to the endpoint, you get the LINE IDs of users following your account.

Save User's LINE ID on CleverTap

After obtaining the list of LINE IDs, you can send it to Clevertap as a custom user property as lineID to each user's profile. You can upload LineID to a user's profile by using APIs or uploading them as CSVs.

Save LINE Push Message API as a Webhook Endpoint in CleverTap

To save LINE Push Message API as a webhook endpoint in CleverTap:

  1. Navigate to Settings > Channels > Webhooks from the CleverTap dashboard.
  2. Click +Add Webhook. The Create webhook template popup opens.

Create Webhook Template

  1. Enter the following details:
NameEnter the name for your webhook endpoint.
HTTP MethodSelect POST from the dropdown list.
Destination URLEnter the following URL in this field:
  1. Toggle ON the Header parameters to add the following Request Headers to the payload:
AuthorizationBearer <{channel access token}>

For more about getting channel access tokens from LINE, refer to Types of Channel access tokens.


Add Request Headers to Payload

  1. Click Create to save the webhook endpoint.

Create a Campaign to Reach your LINE Followers

To create a campaign for your LINE users:

  1. From the CleverTap dashboard, select Campaigns.
  2. Click + Campaign.
  3. From the Messaging Channels list, select Webhooks.

Select Webhooks from Channels List

  1. Enter the required details for Start here section and select the target segment under Who section.

  2. Select JSON from the Webhook format dropdown and select the Custom body option to create a custom body for the request.

  3. Add the body to the request for different types of messages as follows:

    • Simple Text Message
{ "to": "@Profile - LineID | default: " N.A" ", 
"messages":[ { "type":"text", "text":"Hello, world1" } ] }

Sample JSON Body Request for Simple Text Messages

  • Image Message
{ "to": "@Profile - LineID | default: " N.A" ", 
"messages":[ { "type": "image", "originalContentUrl": "", "previewImageUrl": "" } ]}

Sample JSON Body Request for Image Message

  • Video Message
{ "to": "@Profile - LineID | default: " N.A" ", 
"messages":[ { "type": "video", "originalContentUrl": "", "previewImageUrl": "" } ]}

Sample JSON Body Request for Video Message



@Profile - LineID | default: "N.A" personalization fetches the LineID from the user's profile.
For the โ€œtoโ€ key, enter '@' under the value field. Select LineID and provide a default value for the profiles that do not have a LineID (assuming LineID is the user property Key against which you have uploaded user Line ID using API or CSV upload).


Fetching User's Profile

  1. Define the schedule for your webhook campaign and publish the campaign.

For more information about webhook campaigns, refer to the Create Webhook Campaigns section.