> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pathors.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LINE 整合

> LINE 整合端點允許您接收和處理來自 LINE Messaging API 的訊息。

## 基礎 URL

```
https://api.pathors.com
```

## Webhook 端點

### 路徑參數

<ParamField path="projectId" type="string" required>
  您的專案 ID
</ParamField>

### 請求頭

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

### 請求體

請求體遵循 [LINE Messaging API webhook 事件格式](https://developers.line.biz/en/reference/messaging-api/#webhook-event-objects)。

範例：

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

### 回應

<ResponseField name="message" type="string">
  表示 webhook 處理結果的狀態訊息
</ResponseField>

成功回應範例：

```json theme={null}
{
  "message": "OK"
}
```

### 錯誤回應

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

## 設置指南

1. 在 [LINE Developers Console](https://developers.line.biz/console/) 創建 LINE channel
2. 在您的 LINE channel 設置中配置 webhook URL
3. 在您的 Pathors 專案設置中啟用 LINE 整合
4. 將您的 LINE channel 存取令牌添加到整合配置中
