2021年5月22日 星期六

[lineNotify, send] How to send image message using Line Notify

How to send image message using Line Notify

井民全, Jing, mqjing@gmail.com


1-on-1 chat

Send an image to a person.

Step 1: Get the Access Token

See this.


Step 2: Post Command

curl -X POST https://notify-api.line.me/api/notify -H 'Authorization: Bearer YOUR-ACCESS-TOKEN' -F 'message=This is message.' -F 'imageFile=@/home/jing/Pictures/Screenshot from 2020-09-21 16-18-09.png'

Result




Send to a Group

Procedure

Step 1: Add [Line Notify] to the group

Scan the Line Notify 2D code, https://notify-bot.line.me/en/


Step 2: Send the message to the Token

curl -X POST https://notify-api.line.me/api/notify -H 'Authorization: Bearer YOUR-GROUP-TOKEN' -F 'message=foobar' -F 'imageFile=@/home/jing/Pictures/Screenshot from 2020-09-21 16-18-09.png'


Result

References

  1. Purchase, https://manager.line.biz/account/@pij9665l/purchase

  2. Tutorial, https://engineering.linecorp.com/en/blog/using-line-notify-to-send-stickers-and-upload-images/

  3. Line Notify API doc, https://notify-bot.line.me/doc/en/