LINE Messenger
Messenger Partner
Overview
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.
Availability
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:
- Collect customer LINE IDs.
- Save the user's LINE ID on CleverTap.
- Save the LINE push message API as a Webhook endpoint in Clevertap.
- 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 https://api.line.me/v2/bot/followers/ids 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:
- Navigate to Settings > Channels > Webhooks from the CleverTap dashboard.
- Click +Add Webhook. The Create webhook template popup opens.
- Enter the following details:
Field | Description |
---|---|
Name | Enter the name for your webhook endpoint. |
HTTP Method | Select POST from the dropdown list. |
Destination URL | Enter the following URL in this field: https://api.line.me/v2/bot/message/push |
- Toggle ON the Header parameters to add the following Request Headers to the payload:
Key | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <{channel access token}> |
For more about getting channel access tokens from LINE, refer to Types of Channel access tokens.
- Click Create to save the webhook endpoint.
Create a Campaign to Reach your LINE Followers
To create a campaign for your LINE users:
- From the CleverTap dashboard, select Campaigns.
- Click + Campaign.
- From the Messaging Channels list, select Webhooks.
-
Enter the required details for Start here section and select the target segment under Who section.
-
Select JSON from the Webhook format dropdown and select the Custom body option to create a custom body for the request.
-
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" } ] }
- Image Message
{ "to": "@Profile - LineID | default: " N.A" ",
"messages":[ { "type": "image", "originalContentUrl": "https://example.com/original.jpg", "previewImageUrl": "https://example.com/preview.jpg" } ]}
- Video Message
{ "to": "@Profile - LineID | default: " N.A" ",
"messages":[ { "type": "video", "originalContentUrl": "https://example.com/original.mp4", "previewImageUrl": "https://example.com/preview.jpg" } ]}
Note
@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).
- Define the schedule for your webhook campaign and publish the campaign.
For more information about webhook campaigns, refer to the Create Webhook Campaigns section.
Updated 12 months ago