Line

As the name suggests, Line messaging are a core part of klink.cloud — the very reason klink.cloud exists is so you can have secure conversations base on social media platform. On this page, we'll dive into the different messaging endpoints you can use to manage base on social media platform programmatically. We'll look at how to query messaging.

The Line Model

The Line model contains send messaging api endpoint.

POSTapi/v1/message/send

Send message

This endpoint allows you to send message to Line channel.

Required attributes

  • Name
    channelId
    Type
    string
    Description

    The channelId of a channel.

  • Name
    message
    Type
    string
    Description

    Message that you would like to send.

One of the Following is Required

  • Name
    contactId
    Type
    string
    Description

    The contact that belong within Line chat at channel. Required if platformUserId is not provided.

  • Name
    platformUserId
    Type
    string
    Description

    The social platform user that belong within Line chat at channel. Required if contactId is not provided.

Request

POST
/api/v1/message/send
curl -G https://api.klink.cloud/api/v1/message/send \
  -H "Authorization: Bearer {token}" \
  -d channelId = "..." \
  -d message = "Hello" \
  -d contactId = "..." \

Response

{
  "status": "success",
  "channel": "Line",
  "message": "Successfully sent message to platform user Id of ${id}",
  "requestId": "..."
}