> For the complete documentation index, see [llms.txt](https://instag.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://instag.gitbook.io/doc/zheng-he-di-san-fang-ping-tai/line-oa/line-guan-fang-zhang-hao.md).

# Line 官方帳號

## Step 1. LINE OA 開啟 Messaging API

[LINE Official Account Manager](https://manager.line.biz/) 進入您的「官方帳號」，點選右側「設定」進入設定頁面。

1. 點擊「Message API」
2. 按下「啟用 Message API」

<figure><img src="https://2075385674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA8vmX591TX7ccV7n1Qcw%2Fuploads%2F5iq5db027pJpvRNuWbGS%2Fimage.png?alt=media&amp;token=6ec4ec8c-980b-4a21-b7f8-fa8c86cb3b3d" alt=""><figcaption><p>Line OA Message API 設定</p></figcaption></figure>

3. 輸入「服務提供者」名稱
4. 按下「同意」
5. 填寫「隱私權政策」、「服務條款」網址
6. 確定輸入資訊「啟用 Messaging API」

<figure><img src="https://2075385674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA8vmX591TX7ccV7n1Qcw%2Fuploads%2F5XycwC6Yr1XLePUwV5AD%2Fimage.png?alt=media&amp;token=c2efe5ca-6e94-436c-9ba4-da1e30fe0718" alt="" width="563"><figcaption><p>Line OA Message API 輸入服務提供者</p></figcaption></figure>

<figure><img src="https://2075385674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA8vmX591TX7ccV7n1Qcw%2Fuploads%2F1pU1Y3mSwXbgiijTm3YT%2Fimage.png?alt=media&amp;token=bf60c52b-952d-438d-83e5-2b53a82311e6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2075385674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA8vmX591TX7ccV7n1Qcw%2Fuploads%2FW0vgmNKrMYwdpUYwOrKA%2Fimage.png?alt=media&amp;token=16fab418-0279-4b35-aa6f-c142bdddff8f" alt=""><figcaption></figcaption></figure>

Messaging API 啟用完成後看到如下面畫面：

<figure><img src="https://2075385674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA8vmX591TX7ccV7n1Qcw%2Fuploads%2FotOYKHgixx76E87tUbQi%2Fimage.png?alt=media&amp;token=887e3042-01e1-4331-afac-e6e54fc43bca" alt=""><figcaption></figcaption></figure>

## Step 2. LINE Developers 設定 Messaging API 取得 access token

1. 開啟「[Line Developers Console](https://developers.line.biz/console/)」
2. 選擇您的 Channel

<figure><img src="https://2075385674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA8vmX591TX7ccV7n1Qcw%2Fuploads%2FYIRBLQJrRAclnBBD06jX%2Fimage.png?alt=media&amp;token=dfd94e7e-e168-4c96-9590-747eb26c2a9d" alt=""><figcaption></figcaption></figure>

3. 點選「Messaging API」頁籤
4. 於頁面底部找到「Channel access token (long-lived) 」

   <figure><img src="https://2075385674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA8vmX591TX7ccV7n1Qcw%2Fuploads%2FyIDgkN1uCoRxtuk8Pfwb%2Fimage.png?alt=media&amp;token=0b713131-ff58-4bc9-97b7-693caa2ecafd" alt=""><figcaption></figcaption></figure>

## Step 3. Instag AI 後台設定 Line Messaging API 整合

1. 開啟 「[Instag AI](https://pro.instag.ai)」
2. 左側選單點選「整合 > LINE 官方帳號」
3. 切換開啟「啟用」
4. 將 Step 2. 中取得的 Channel access token 貼入「權杖」欄位
5. 點擊「儲存」

<figure><img src="https://2075385674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA8vmX591TX7ccV7n1Qcw%2Fuploads%2FZUxzRRl7XEL8gUUoxpdn%2Fimage.png?alt=media&amp;token=cb4afd1a-a1dd-465d-bf30-721f0aa85c71" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://instag.gitbook.io/doc/zheng-he-di-san-fang-ping-tai/line-oa/line-guan-fang-zhang-hao.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
