# 正式與LINE串接

先運行我們的webhook 看一下Flask目前run在那個port上面\
並且使用ngrok 將那個port與ngrok進行連結

```
./ngrok http 5000
```

![ngrok 運行介面](/files/-LQSyge0FiAJq4FyUmO1)

看到Forwarding的部分那個就是我們在ngrok的URL\
而本次demo我的URL是<https://b5de24f8.ngrok.io>\
我們在加上/callback則是我們line webhook的位置\
<https://b5de24f8.ngrok.io/callback> 等於 <http://127.0.0.1:5000/callback><br>

我們再將<https://b5de24f8.ngrok.io/callback> 這個連結設定到LINE Developer當中

![設定頁面](/files/-LQSzZRUlh1wDgBa9-Q0)

![對話畫面](/files/-LQSzsmjN-7U3sZxwttJ)

\
以上就完成我們的LINE ChatBot教學囉\~\
謝謝各位的參與


---

# 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://qiu-yan-ming.gitbook.io/python-chatbot/zheng-shi-line-chuan-jie.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.
