Push (Partner Limit)
概述
當您需要向特定的用戶發送個性化的訊息時,您可以利用 FIRST LINE 的 PUSH API 來進行整合。這種整合方式可以讓您更有效地傳達訊息。
此外,使用 PUSH API 也可以幫助您節省時間和資源,因為您不需要自己從頭開始建立訊息傳遞系統。只需簡單的幾步操作,您就可以開始發送個性化的訊息給您的用戶。
API
curl -X POST
-H "Content-Type: application/json"
目前為商業夥伴限定,暫不開放。
Response
回傳為 JSON 格式,而 HTTP status 為代碼 200,表示發送成功。
{}
URL Parameters
Message 欄位訊息格式
文字訊息 Text
{
"type": "text",
"message": "要傳送的文字訊息"
}
按鈕 Button
{
"type": "button",
"message": {
"explain_text": "內文描述",
"options": [
{
"label": "按鈕文字",
"value": "發送訊息",
"type": "text"
},
{
"label": "撥打電話",
"type": "phonenumber",
"number": "+886012345679"
},
{
"label": "開啟網址",
"type": "url",
"url": "https://www.firstline.cc/"
}
]
}
}
快速回覆 Quick Reply
{
"type": "quickreply",
"message": {
"explain_text": "內文訊息",
"options": [
{
"label": "#001",
"value": "001",
"type": "url",
"url": "https://www.firstline.cc/"
},
{
"label": "#002",
"value": "002",
"type": "text"
},
{
"label": "#003",
"value": "003",
"type": "text"
}
]
}
}
輪播訊息 Carousel
用於發送可左右滑動的輪播內容。每一個輪播項目均包含圖片、簡短的描述與按鈕。
{
"type": "carousel",
"message": {
"alt_text": "Message format not supported.",
"columns": [
{
"image_url": "https://www.firstline.cc/assets/images/illustration/header.png",
"title": "全方位客服系統",
"text": "整合多種溝通管道,包括電話、LINE、Facebook、即時聊天、WhatsApp等,讓您能高效地提供客戶支援和銷售服務。",
"actions": [
{
"text": "Nike",
"value": "Nike",
"url": "https://www.firstline.cc/",
"type": "url"
},
{
"label": null,
"value": null,
"type": "url",
"url": "https://www.firstline.cc/",
"text": "FIRST LINE 客服系統"
},
{
"label": null,
"value": "其他",
"type": "text",
"url": null,
"text": "其他"
}
]
},
]
}
圖片輪播 Image Carousel
{
"type": "image_carousel",
"message": {
"alt_text": "Message format not supported.",
"columns": [
{
"image_url": "https://www.firstline.cc/assets/images/illustration/header.png",
"action": {
"type": null,
"url": null,
"value": null
},
"button": {
"text": "立即註冊",
"background_color": "#09091A",
"border_color": "#09091A",
"color": "#09091A"
},
"badge": {
"text": "SALE",
"background_color": "#eb4d4b",
"border_color": "#eb4d4b",
"color": "#FFFFFF"
}
}
]
}
}
Last updated