Socket
Socket
Sign inDemoInstall

node-red-contrib-line-messaging-api

Package Overview
Dependencies
87
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-red-contrib-line-messaging-api

Node-REDでLINE Botが作れます。


Version published
Weekly downloads
49
decreased by-47.31%
Maintainers
2
Install size
6.76 MB
Created
Weekly downloads
 

Readme

Source

LINE Messagin APIのNode-REDのノードです。

概要

LINE Messagin APIを利用できるNode-REDのノードです。

以下のAPIを利用できます。

  • LINE Messaging API
    • Webhook & Reply Message
    • Push Message
    • BloadCast Message
  • LINE Notify

インストール

npm i node-red-contrib-line-messaging-api

or

AdminタブからInstall

利用イメージ

Webhook & Reply Message

  1. Webhookノードを配置し、ダブルクリックで設定を開き、指定した /path と自身のホスト名の組み合わせ(Webhook URL)を、LINE Developersであらかじめ作成したMessaging APIに登録します。
  2. ReplyMessageノードを配置し、チャネルのシークレットとアクセストークンを設定します。
  3. WebhookノードとReplyMessageノードを接続してLINEにメッセージを送るとオウム返しBotができます。
    Image from Gyazo
  4. WebhookノードとReplyMessageノードの中間で msg.payload をうまく作成すると様々なメッセージが送れます。文字列を指定すると通常のテキストメッセージに、LINEで定義されているメッセージオブジェクトを指定すればそのメッセージを返信することができます。

Push Message

Bloadcast Message

  • 友達全員にメッセージ配信

LINE Notify

LINE Notify_new

過去のものとAPIは変わってないですが、オプション指定ができます。

template nodeにJSONを設定してみてください。

  • 画像とスタンプも送る例
{
    "stickerPackageId": "446",
    "stickerId": "1988",
    "message": "{{payload}}",
    "imageThumbnail": "https://i.gyazo.com/a84c585225af440bd0d5fff881152792.png",
    "imageFullsize": "https://i.gyazo.com/a84c585225af440bd0d5fff881152792.png"
}

release

  • 2023/12/11: Notify_newを追加。スタンプや画像も送れるように。
  • 2021/8/1: Reply Messageが画像に対応(thanks @ukkz
  • 2020/12/17: Bloadcast Messageに対応、Reply MessageがFlex Messageに対応(thanks @gaomar
  • 2019/2/13: PUSH MessageとLINE Notify対応
  • 2018/10/11: 現状は簡単なリプライのみ実装されています。

Keywords

FAQs

Last updated on 18 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc