> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/build/choose-channel/web-chat/connected-services.md).

# 已連接的服務

使用者自助管理 Agent 代自己存取的外部服務：在 Agent 市集與 Web Chat 的「已連接的服務」查看授權狀態、重新授權或解除連接，以及管理員要先做什麼。

Agent 要用**你本人的帳號**去查行事曆、讀雲端硬碟或操作外部系統時，會先在對話裡請你授權。你授權過的服務都集中在 <mark style="color:blue;">已連接的服務</mark> 這個視窗：看得到授權狀態與效期、可以重新授權，也隨時可以解除連接。這是使用者自己管理的入口，不必請管理員代勞。

{% hint style="info" %}
這一頁講的是「Agent 代我存取服務」的授權，對象是 Agent 市集與 Web Chat 的使用者。MaiGPT 使用者在「＋」選單裡接的 Notion、Slack 等連接器，是另一套入口，見 [MaiGPT 連接器](/work/maigpt/connectors.md)。
{% endhint %}

## 在哪裡打開 <a href="#where-to-open" id="where-to-open"></a>

| 使用情境                                                                | 入口                                                | 誰看得到                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 後台 → <mark style="color:blue;">Agent 市集</mark> → 與**官方內建 Agent** 對話 | 對話頁頂部的 <mark style="color:blue;">已連接的服務</mark> 按鈕 | 所有與官方內建 Agent 對話的成員（組織自建 Agent 的對話頁沒有這顆按鈕）                                                                                                                                                                                               |
| 網站上的 Web Chat（全螢幕頁或公開訪問網址）                                          | 標題列的鏈結圖示，滑過顯示「已連接的服務」                             | 已識別身分的訪客：填過 [Pre-chat 表單](/build/choose-channel/web-chat.md#pre-chat-form)、已[登入](/build/choose-channel/web-chat.md#login-config)，或由網站以 [Source ID](/build/choose-channel/web-chat/source-id-access.md) 帶入身分。匿名訪客、右下角浮動視窗與 MaiGPT 視窗模式不顯示 |

## 第一次授權：對話中的授權卡 <a href="#authorization-card" id="authorization-card"></a>

Agent 第一次需要某個服務時，對話裡會出現「連接 {服務}」卡片，列出 <mark style="color:blue;">將取得的權限</mark>，並說明憑證由後端加密保存、不會存在你的瀏覽器。點 <mark style="color:blue;">前往授權</mark>（後台為 <mark style="color:blue;">授權連接</mark>）會開新視窗到該服務登入並同意（帳號密碼只在該服務的官方頁面輸入，MaiAgent 不會經手）；完成後卡片變成「已連接 {服務}」，Agent 就能接著用你的身分取得資料。

{% hint style="warning" %}
看到「瀏覽器攔截了新視窗，請允許彈出視窗後再試」時，請在瀏覽器允許這個網站開啟彈出視窗，再點一次授權。
{% endhint %}

{% hint style="info" %}
授權視窗關閉後，卡片會再確認授權結果十幾秒，通常很快就會變成「已連接 {服務}」。等了仍沒有變化時，再點一次授權即可。
{% endhint %}

## 視窗裡有什麼 <a href="#window-layout" id="window-layout"></a>

打開 <mark style="color:blue;">已連接的服務</mark> 後，左側是服務清單、右側是選中服務的詳情。

**左側清單**

* <mark style="color:blue;">搜尋服務…</mark> 依名稱篩選。
* 每個服務標示狀態：<mark style="color:blue;">已授權</mark>（可以用）、<mark style="color:blue;">待授權</mark>（還沒授權過）、<mark style="color:blue;">需重連</mark>（授權失效，Agent 目前拿不到資料）。
* 清單是空的時顯示「尚未有可連接的服務」，代表你用到的 Agent 都沒有需要你個人授權的服務。

**右側詳情**

| 區塊                                         | 內容                                                                                                                                                                                                                                           |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 狀態提示                                       | 待授權時顯示「尚未授權」與 <mark style="color:blue;">授權連接</mark>；需重連時顯示「連接已失效，需重新授權」與 <mark style="color:blue;">重新授權</mark>。重新授權不會影響你在該服務裡的任何內容                                                                                                           |
| <mark style="color:blue;">使用這個服務的助理</mark> | 哪些 Agent 會透過這個授權存取資料                                                                                                                                                                                                                         |
| <mark style="color:blue;">授權資訊</mark>      | <mark style="color:blue;">授權帳號</mark>（你在該服務登入的帳號）、<mark style="color:blue;">授權方式</mark>（OAuth 2.0）、<mark style="color:blue;">授權時間</mark>、<mark style="color:blue;">憑證效期</mark>（例如「N 天後」）、<mark style="color:blue;">Token 儲存方式</mark>（後端加密保存） |
| 授權範圍                                       | 已授權的服務列 <mark style="color:blue;">已授權範圍</mark>；還沒授權的列 <mark style="color:blue;">將要求的授權範圍</mark>，先看清楚再授權                                                                                                                                      |
| <mark style="color:blue;">解除連接</mark>      | 見下一節                                                                                                                                                                                                                                         |

## 解除連接 <a href="#disconnect" id="disconnect"></a>

在服務詳情點 <mark style="color:blue;">解除連接</mark>，確認視窗會列出「將影響以下助理」；按下確認後，這些 Agent 立刻無法再代你存取該服務，之後要用需要重新授權。

{% hint style="info" %}
解除連接是撤銷 MaiAgent 這一端保存的憑證。若畫面提示「已解除平台端連接；如需完全移除，可至 {服務} 的帳號設定確認」，代表該服務那一端可能仍把 MaiAgent 列為已授權的應用程式，想徹底移除請到該服務的帳號設定再撤銷一次。
{% endhint %}

## 常見問題 <a href="#faq" id="faq"></a>

### 服務顯示「需重連」，Agent 回答說拿不到資料？ <a href="#faq-reauthorize" id="faq-reauthorize"></a>

授權憑證已過期。打開 <mark style="color:blue;">已連接的服務</mark>，選該服務按 <mark style="color:blue;">重新授權</mark>，完成後再問一次即可。

### 我沒有看到「已連接的服務」按鈕？ <a href="#faq-no-button" id="faq-no-button"></a>

* Web Chat：你目前是匿名訪客，或是在右下角浮動視窗裡。請用全螢幕頁開啟，並先填寫表單或登入。
* 後台：這顆按鈕只在官方內建 Agent 的對話頁出現。

### 授權的是誰的帳號？會不會被其他同事用到？ <a href="#faq-whose-account" id="faq-whose-account"></a>

是你自己在該服務登入的帳號，只有你本人與 Agent 的對話會用到；其他人要用同一個服務，得各自授權。管理員若希望全組織共用一組帳號，會在建立工具時把授權對象設為「組織共用」，那種服務不會出現在這個視窗裡。

## 給管理員：要讓服務出現在這裡 <a href="#for-admins" id="for-admins"></a>

這個視窗列出的，是 Agent 所配置、且授權對象為「聯絡人個別授權」的 OAuth MCP 工具。設定方式見 [建立 MCP 工具：OAuth 連接器與授權對象](/build/tools/mcp-setup.md#oauth-auth-subject)；管理員也能在 <mark style="color:blue;">聯絡人</mark> 編輯視窗的 <mark style="color:blue;">Connector 授權</mark> 分頁查看或撤銷某位聯絡人的授權。要替聯絡人預先帶入既有系統的憑證（不走 OAuth），見 [聯絡人 MCP 憑證設定](/build/tools/setup-contacts-mcp-credentials.md)。


---

# 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://docs.maiagent.ai/build/choose-channel/web-chat/connected-services.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.
