# How to connect

### Steps to connect

1. Get Channel Secret from your LINE Official Account [https://manager.line.biz](https://manager.line.biz/)
2. Get Channel Access Token from your LINE Developers Console [developers.line.biz](https://developers.line.biz)
3. Enter these into Zaapi and connect
4. Go back to the LINE Developers Console and enable webhooks & webhook redelivery

{% hint style="warning" %}
You will need to get a Channel Secret from your LINE Official Account and Channel Access token from the LINE Developers Console - make sure you can access both of these.

If you do not have access to the LINE Developers Console, then [contact the Zaapi team](https://www.zaapi.com/contact-us) for further assistance.
{% endhint %}

### Full Instructions

**Step 1: Get Channel Secret from your LINE Official Account**

1. Log in to your LINE Official Account [https://manager.line.biz](https://manager.line.biz/)
2. Select the LINE account you want connect
3. Go to Settings -> Messaging API -> Click "Enable Messaging API"

   <div align="center"><figure><img src="https://3192879026-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLCz35HGsZaSVs8jhhqnk%2Fuploads%2FXdPH8a2GdkYsdnllQACF%2FScreenshot%202568-05-19%20at%2017.57.53.png?alt=media&#x26;token=b79a88c7-72da-4736-afd2-880b8929a05d" alt="" width="563"><figcaption></figcaption></figure></div>
4. Create a LINE Developers Provider and optionally enter a Privacy Policy & Terms of Use URLs
5. Confirm and create your Provider
6. Save the Channel Secret - you will need to enter this value into Zaapi later

   <div align="center"><figure><img src="https://3192879026-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLCz35HGsZaSVs8jhhqnk%2Fuploads%2FPvRzKpsBresge2ZbgLsj%2FScreenshot%202568-05-19%20at%2018.15.06.png?alt=media&#x26;token=f0ee2399-8319-4319-a05f-f01942ceb2f3" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 2: Get Channel Access Token from LINE Developers Console**

1. Go to the LINE Developers Console [developers.line.biz](https://developers.line.biz)
2. Select the Provider that you created above
3. Select the Messaging API channel and go to the Messaging API tab

<div><figure><img src="https://3192879026-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLCz35HGsZaSVs8jhhqnk%2Fuploads%2FokYV5kEBpbjcG0JzoCmT%2FScreenshot%202568-05-19%20at%2019.18.58.png?alt=media&#x26;token=180bcba1-85a9-4e77-95da-564db643bc74" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="https://3192879026-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLCz35HGsZaSVs8jhhqnk%2Fuploads%2FXlFV9w8iV8XjTItZbRV2%2FScreenshot%202568-05-19%20at%2019.19.17.png?alt=media&#x26;token=1d82700b-7e5a-4565-a9d9-de6b054986e7" alt=""><figcaption></figcaption></figure></div>

4. Scroll to the bottom and issue a Channel access token (long-lived) - you will need to enter this value into Zaapi later

<div align="center"><figure><img src="https://3192879026-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLCz35HGsZaSVs8jhhqnk%2Fuploads%2F8YFhkZqDmdCYzJdfz5cL%2FScreenshot%202568-05-19%20at%2019.19.57.png?alt=media&#x26;token=aadf3ef9-47d0-410d-8994-4ddc116eb4b4" alt="" width="294"><figcaption></figcaption></figure></div>

**Step 3: Connect in Zaapi and enable webhooks in LINE Developers**

1. Go to the Integrations Area – Navigate to Settings > Integrations in Zaapi
2. Click "LINE Official Account"
3. Enter the Channel Secret & Access Token obtained above, and click Connect. Wait for your LINE OA account to appear.

<div align="center"><figure><img src="https://3192879026-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLCz35HGsZaSVs8jhhqnk%2Fuploads%2FagoytGn2vzqsYFojUrqH%2FScreenshot%202568-05-19%20at%2019.11.43.png?alt=media&#x26;token=7b924d2d-151e-42d5-a0d1-dfd7e4b71815" alt="" width="375"><figcaption></figcaption></figure></div>

4. Go back to the [LINE Developers Console](https://developers.line.biz/) Messaging API tab. Refresh the page, and you will see a Webhook URL populated in the Webhook settings section
5. Toggle both "Use webhook" and "Webhook delivery". For Webhook delivery you will be asked to confirm, which you can do. New messages will now start appearing in Zaapi.

<div align="center"><figure><img src="https://3192879026-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLCz35HGsZaSVs8jhhqnk%2Fuploads%2FiTrf5HbRZH9gougB7Xbc%2FScreenshot%202568-05-19%20at%2019.27.26.png?alt=media&#x26;token=a9813637-f48a-415c-b974-be2acc79aed7" 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/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.
