/line-delay-message-api

Send a message to a Line user at a specific time in the future with a delay time and units of time.

Primary LanguageJavaScriptMIT LicenseMIT

LINE delay message API

The Line Delayed Message API allows you to send a message to a Line user at a specific time in the future, with the ability to specify a delay time and units of time

APIs

Send Delay Message

curl --location "https://line-delay-message-api.glitch.me/v1/send" \
--header "X-Line-Access-Token: ${CHANNEL_ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--data '{
    "to": "U4af4980629...",
    "messages": [
        {
            "type": "text",
            "text": "OK"
        }
    ],
    "delay": "5m"
}'

Time delay units (s = seconds, m = minutes, h = hours, etc.)

Cancel

curl --location "https://line-delay-message-api.glitch.me/v1/cancel" \
--header "Content-Type: application/json" \
--data '{
    "messageId": "message id to cancel the sending of messages"
}'

Development

Installation

$ npm install

Run

$ npm start

Testing

$ npm test