下面是quickReply的JSON格式:
{
"replyToken": "
"messages": [
{
"type": "text",
"text": "測試泡泡選單。",
"quickReply": {
"items": [
{
"type": "action",
"action": {
"type": "message",
"label": "泡泡1",
"text": "泡泡1"
}
},
{
"type": "action",
"action": {
"type": "message",
"label": "泡泡2",
"text": "泡泡2"
}
},
{
"type": "action",
"action": {
"type": "message",
"label": "泡泡3",
"text": "泡泡3"
}
}
]
}
}
]
}
若當初建立LINE的channel時,是選Developer Trial,你就可以用下列語法PUSH訊息到LINE,把
curl -v -X POST https://api.line.me/v2/bot/message/push \ -H 'Content-Type:application/json' \ -H 'Authorization: Bearer {
也可以在webhook收到訊息後,用reply的格式回傳,參考下列文章。
參考本部落格的LINE機器人:
https://oscarhsu70.blogspot.com/2020/01/line.html
參考官方文件:
https://developers.line.biz/en/docs/messaging-api/using-quick-reply/
沒有留言:
張貼留言