Line Messaging API
Overview
The Line Messaging API enables businesses to send secure, real-time messages via the LINE Official Account (OA) API. This API allows businesses to manage and automate messaging for improved customer engagement. Designed for transactional messaging, this API ensures timely notifications and seamless interactions between businesses and their customers on the LINE platform.
Use Case Examples
The Line Messaging API is ideal for sending critical notifications and updates, including:
Order Notifications – Inform customers about order statuses (e.g., "Your order #12345 has been shipped.")
Payment Confirmations – Notify users when payments are received (e.g., "Payment of $50 was successfully received.")
Appointment Reminders – Send reminders for upcoming bookings (e.g., "Reminder: Your appointment is scheduled for tomorrow at 10 AM.")
Account Alerts – Enhance security with login alerts or password reset confirmations (e.g., "Suspicious login detected on your account.")
Delivery Updates – Keep customers informed about their package delivery status.
Prerequisites
Before using this API, ensure the following:
Admin Access – The user must have admin privileges in the klink.cloud platform.
Access Token – An access token must be generated in the Settings > Developer section of the klink.cloud dashboard.
Connected LINE Official Account – Your LINE Official Account must be connected to the klink.cloud platform. Check Settings > Message Integration to ensure the LINE OA channel is properly linked.
Retrieve Channel ID – You must retrieve the correct
channelId
for the LINE channel using the Channel Listing API.
Retrieving Channel ID
Before sending messages, you need to find the correct channelId
by querying the Channel Listing API.
List Channels
Endpoint:
This endpoint allows you to retrieve a paginated list of all available channels.
Optional Parameters
Name
Type
Description
keyword
string
Search channels by keyword. Supports partial matching.
Request Example
Messaging Endpoints
Send Message
Endpoint:
This endpoint allows you to send a transactional message to a contact on the Line channel using the secure LINE Official Account (OA) API.
Required Parameters
channelId
string
The unique identifier of channel. Retrieve it using the Channel Listing API.
message
string
The message content to be sent.
One of the Following is Required:
contactId
string
The unique identifier of a contact in klink.cloud's platform. Required if platformUserId
is not provided.
platformUserId
string
The unique user identifier (UID) of the customer’s Line account. Required if contactId
is not provided.
Request Examples
Endpoint
POST /api/v1/message/send
Authentication
Include the Authorization
header with a Bearer token:
Request Format
Response
Notes
Ensure that the
Authorization
token is valid.Either
contactId
orplatformUserId
must be provided.contactId
refers to the unique contact ID stored within klink.cloud’s platform.platformUserId
is the unique user identifier (UID) of the customer’s Line account.The
channelId
must be retrieved using the Channel Listing APIThis API is designed for sending transactional messages via the secure LINE Official Account API.
For more details, visit klink.cloud API Documentation.
Last updated