Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anechas/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.
https://github.com/anechas/line-delay-message-api
delay-messages expressjs line line-chat rest-api schedule-messages
Last synced: 8 days ago
JSON representation
Send a message to a Line user at a specific time in the future with a delay time and units of time.
- Host: GitHub
- URL: https://github.com/anechas/line-delay-message-api
- Owner: AnechaS
- License: mit
- Created: 2023-04-08T08:59:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-09T00:24:46.000Z (over 1 year ago)
- Last Synced: 2024-11-06T21:45:50.755Z (about 2 months ago)
- Topics: delay-messages, expressjs, line, line-chat, rest-api, schedule-messages
- Language: JavaScript
- Homepage:
- Size: 286 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
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.](https://www.npmjs.com/package/ms))
### Cancel
```bash
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
```bash
$ npm install
```### Run
```bash
$ npm start
```### Testing
```bash
$ npm test
```