# วิธีเชื่อมต่อ

### ขั้นตอนการเชื่อมต่อ

1. รับ Channel Secret จาก LINE Official Account ของคุณ [https://manager.line.biz](https://manager.line.biz/)
2. รับ Channel Access Token จาก LINE Developers Console ของคุณ [developers.line.biz](https://developers.line.biz)
3. กรอกข้อมูลเหล่านี้ลงใน Zaapi แล้วเชื่อมต่อ
4. กลับไปที่ LINE Developers Console และเปิดใช้งาน webhooks และ webhook redelivery

{% hint style="warning" %}
คุณจะต้องรับ Channel Secret จาก LINE Official Account ของคุณ และ Channel Access token จาก LINE Developers Console - โปรดตรวจสอบให้แน่ใจว่าคุณสามารถเข้าถึงทั้งสองอย่างนี้ได้

หากคุณไม่มีสิทธิ์เข้าถึง LINE Developers Console โปรด [ติดต่อทีม Zaapi](https://www.zaapi.com/contact-us) เพื่อขอความช่วยเหลือเพิ่มเติม
{% endhint %}

### คำแนะนำฉบับเต็ม

**ขั้นตอนที่ 1: รับ Channel Secret จาก LINE Official Account ของคุณ**

1. เข้าสู่ระบบ LINE Official Account ของคุณ [https://manager.line.biz](https://manager.line.biz/)
2. เลือกบัญชี LINE ที่คุณต้องการเชื่อมต่อ
3. ไปที่ Settings -> Messaging API -> คลิก "Enable Messaging API"

   <div align="center"><figure><img src="/files/045af64c68564499e16a8881d1bc7181be2609ae" alt="" width="563"><figcaption></figcaption></figure></div>
4. สร้าง LINE Developers Provider และสามารถกรอก URL ของ Privacy Policy และ Terms of Use ได้ตามต้องการ
5. ยืนยันและสร้าง Provider ของคุณ
6. บันทึก Channel Secret - คุณจะต้องนำค่านี้ไปกรอกใน Zaapi ภายหลัง

   <div align="center"><figure><img src="/files/b1e672b7c942f839ff1653a6b75c2e3b4588a110" alt="" width="375"><figcaption></figcaption></figure></div>

**ขั้นตอนที่ 2: รับ Channel Access Token จาก LINE Developers Console**

1. ไปที่ LINE Developers Console [developers.line.biz](https://developers.line.biz)
2. เลือก Provider ที่คุณสร้างไว้ข้างต้น
3. เลือกช่อง Messaging API และไปที่แท็บ Messaging API

<div><figure><img src="/files/185a3d78c6a49d7639fc28a08f49123695ee4009" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="/files/6caac45fa8fd6cf4a8d20097517e832f1bf4cf06" alt=""><figcaption></figcaption></figure></div>

4. เลื่อนลงไปด้านล่างและออก Channel access token (long-lived) - คุณจะต้องนำค่านี้ไปกรอกใน Zaapi ภายหลัง

<div align="center"><figure><img src="/files/3e3d093d8ec8586de2684c8589105c0d3d4023d4" alt="" width="294"><figcaption></figcaption></figure></div>

**ขั้นตอนที่ 3: เชื่อมต่อใน Zaapi และเปิดใช้งาน webhooks ใน LINE Developers**

1. ไปที่ส่วน Integrations – ไปที่ Settings > Integrations ใน Zaapi
2. คลิก "LINE Official Account"
3. กรอก Channel Secret และ Access Token ที่ได้จากข้างต้น แล้วคลิก Connect รอให้บัญชี LINE OA ของคุณปรากฏขึ้น

<div align="center"><figure><img src="/files/e707395c094544df08ea0747ba4efdc30fb26942" alt="" width="375"><figcaption></figcaption></figure></div>

4. กลับไปที่ [LINE Developers Console](https://developers.line.biz/) แท็บ Messaging API รีเฟรชหน้า แล้วคุณจะเห็น Webhook URL ถูกกรอกไว้ในส่วนการตั้งค่า Webhook
5. เปิดใช้งานทั้ง "Use webhook" และ "Webhook delivery" สำหรับ Webhook delivery คุณจะถูกขอให้ยืนยัน ซึ่งคุณสามารถทำได้ ข้อความใหม่จะเริ่มแสดงใน Zaapi

<div align="center"><figure><img src="/files/9e99ddcc7fb934ea2e06cc95a265bdd06be18b00" alt="" width="563"><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.zaapi.com/th/integrations/line/how-to-connect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
