-
Notifications
You must be signed in to change notification settings - Fork 0
LINE Message API Broadcast Message Node
NODE-RED node for broadcast message to LINE Messaging API channel. You can use LINE Messaging API, broadcast message, through this Node.
- Create LINE Messaging API Channel in LINE Developer console. Use this official document Getting started with the Messaging API to create your own LINE Messaging API.
- Obtain a Channel Access Token and Channel Secret from your created LINE Messaging API Channel (Actually, LINE Message API Broadcast Message use only Channel Access Token, but Configuation Node require both Channel Access Token and Channel Secret for configuration).
- Add Messaging API Channel to LINE application.
- Add LINE Message API Broadcast Message Node in Node-RED workspace.
- Configure LINE Messaging API Channel Access Token and Channel Secret in Broadcast Message Node.
- Setup Node values
* **Use/Don't use message data from wired node**. If use message data from wired node, it does not use message type and message content from Node Input.
* **Message Type**, Normal Text (`string`) or Custom Message Format (`JSON`)
* **Message**, message for broadcast.
* **Disabled Push Notification**, the user does/doesn't receive push notification when the message is sent.
- Run workflow.
- Check result.
When setup node values to use message data from wired node, it uses msg object instead node input.
Property | Mandatory | Type | Description |
---|---|---|---|
messageType | No (Yes, if select 'Use Message data from wired node') | int |
0 : for normal text message for broadcast message. 1 : for custom message format for broadcast message. |
payload | No (Yes, if select 'Use Message data from wired node') | string or JSON | Type string : for normal text message Type JSON : for custom message format Node broadcast message validate payload at runtime |
Result from broatcast message by using msg object.
Property | Type | Description |
---|---|---|
status | number | Result status code |
payload | string | Result status message |
- Output success case
status = 0, payload = Broadcast message success: {"x-line-request-id":"xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"}
Remark : {"x-line-request-id":"xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"} is result from LINE response.
- Output Fail case
status = <Error Number>, payload = <Error message>
Obtain LINE Messaging API Channel Access Token at your LINE Messaging API Channel.
See more details at LINE Messaging API (Broadcast Message) Document.
Custom message format can see more details at LINE Message Types.
For more information, see List of available LINE emojis.
Node has paste function data from clipboard, so allow paste permmision in browser to able to work paste function.