-
Notifications
You must be signed in to change notification settings - Fork 0
LINE Message API Push Message Node
Jatuphum Tungsilsukchai edited this page Mar 27, 2022
·
7 revisions
NODE-RED node for pushing message to LINE Messaging API channel. You can use LINE Messaging API, push message, through this Node.
- Create LINE Messaging API Channel in LINE Developer console.
- Obtain a Channel Access Token from your created LINE Messaging API Channel.
- Add Messaging API Channel to LINE application.
- Find destination ID for push message to.
- Configure LINE Messaging API Channel Access Token and Channel Secret in Push Message Node.
- Setup Node mode
- Use/Don't use message data from wired node.
- Use/Don't use destination ID data from wired node.
- Setup other notify options
- Run workflow
- Check result.
Using msg object.
| Property | Mandatory | Type | Description |
|---|---|---|---|
| destinationId | No (Yes, if select 'Use ID data from wired node') | string | Specified destination ID for push message to |
| messageType | No (Yes, if select 'Use Message data from wired node') | int |
0 : for normal text message for push message. 1 : for custom message format for push 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 push message check payload type at runtime |
Using msg object.
Output success - status = 0, payload = Push message success: {"x-line-request-id":"xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"}
Output Fail - status = <Error Number>, payload = <Error message>
| Property | Type | Description |
|---|---|---|
| status | number | Result status code |
| payload | string | Result status message |
Obtain LINE Messaging API Channel Access Token at your LINE Messaging API Channel.
See more details at LINE Messaging API (Push 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.