Line Robot ( 四 ) - Reply Message API (Include reply message object)
前 言: 在 上一章 有提到如何回應使用者訊息,故本文就來探討Line回應訊息及主動發送訊息的功能。 Line提供了各網路接口(API)提供開發者去使用其服務,其中有Reply Message API以及Push Message API與Send Multicast Message API。 Reply Message API 網址 https://api.line.me/v2/bot/message/reply 請求方法 POST Request headers Content-Type application/json Authorization Bearer { channel access token } channel access token在Line機器人設定中有Channel access token選項,按下右方按鈕即可產生channel access token。 Request body 屬性名稱 資料型別 註解 replyToken String Reply token received via webhook messages Array of message objects Messages Max: 5 Line官方提供了數個Message Object供使用者任意搭配使用,要注意的是每次傳送的Message Object數量最大為五個,接下來開始介紹基本的Message Object Text message Property Type Description type String text text String Message text. You can include the following emoji: Unicode emoj...