POST
/
api
/
project
/
{projectId}
/
integration
/
line
/
callback
curl --request POST \
  --url https://app.pathors.com/api/project/{projectId}/integration/line/callback
{
  "message": "<string>"
}

Webhook 端點

路徑參數

projectId
string
required

您的專案 ID

請求頭

LINE Messaging API 將發送帶有特定頭部的請求用於身份驗證和驗證。

請求體

請求體遵循 LINE Messaging API webhook 事件格式

範例:

{
  "events": [
    {
      "type": "message",
      "message": {
        "type": "text",
        "text": "你好"
      },
      "timestamp": 1462629479859,
      "source": {
        "type": "user",
        "userId": "U4af4980629..."
      },
      "replyToken": "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA",
      "mode": "active"
    }
  ]
}

回應

message
string

表示 webhook 處理結果的狀態訊息

成功回應範例:

{
  "message": "OK"
}

錯誤回應

狀態碼描述
400整合已禁用
404未找到整合
500內部伺服器錯誤

設置指南

  1. LINE Developers Console 創建 LINE channel
  2. 在您的 LINE channel 設置中配置 webhook URL
  3. 在您的 Pathors 專案設置中啟用 LINE 整合
  4. 將您的 LINE channel 存取令牌添加到整合配置中