> 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/maiagent-user-guide/ja/serve/choose-channel/whatsapp.md).

# メッセージングプラットフォームとの連携：WhatsApp

## 連携前の確認事項 <a href="#pre-integration-checklist" id="pre-integration-checklist"></a>

* [MaiAgent プラットフォーム](https://admin.maiagent.ai/)上で「AI アシスタント」を作成済みであること
* [Meta Business](https://business.facebook.com/) アカウントを保有していること
* WhatsApp Business アカウントを作成し、電話番号を紐付け済みであること

## 連携を開始する <a href="#start-integration" id="start-integration"></a>

### 1. 対話プラットフォーム連携ページを開く <a href="#step-go-to-channel-page" id="step-go-to-channel-page"></a>

左側メニューで <mark style="color:blue;">対話プラットフォーム</mark> をクリックし、右上の <mark style="color:blue;">対話プラットフォームを連携</mark> ボタンをクリックします。

### 2. WhatsApp を選択する <a href="#step-select-whatsapp" id="step-select-whatsapp"></a>

プラットフォーム選択ページで <mark style="color:blue;">WhatsApp</mark> をクリックします。

### 3. Facebook アカウントを接続する <a href="#step-connect-facebook-account" id="step-connect-facebook-account"></a>

<mark style="color:blue;">WhatsApp を接続</mark> ボタンをクリックすると、Facebook の OAuth ログインウィンドウが開きます。

1. ご自身の Facebook アカウントにログインします
2. MaiAgent に WhatsApp Business の管理権限へのアクセスを許可します
3. 許可が完了すると、ウィンドウは自動的に閉じて設定ページに戻ります

{% hint style="warning" %}
ブラウザでポップアップウィンドウが許可されていることを確認してください。許可されていない場合、OAuth ログインウィンドウがブロックされることがあります。
{% endhint %}

### 4. WhatsApp Business アカウントと電話番号を選択する <a href="#step-select-whatsapp-business-account-and-phone" id="step-select-whatsapp-business-account-and-phone"></a>

OAuth 認証が完了したら：

1. <mark style="color:blue;">WhatsApp Business アカウントを選択</mark> のドロップダウンメニューから、連携するビジネスアカウントを選択します
2. <mark style="color:blue;">電話番号を選択</mark> のドロップダウンメニューから、メッセージを受信する電話番号を選択します

### 5. 基本設定 <a href="#step-basic-settings" id="step-basic-settings"></a>

| 項目              | 説明                                         |
| --------------- | ------------------------------------------ |
| **対話プラットフォーム名** | この連携に識別しやすい名前を付けます                         |
| **AI アシスタント**   | 紐付ける AI アシスタントを選択します                       |
| **リセットコマンド**    | （任意）ユーザーが会話を最初からやり直すためのコマンドを設定します。例：「最初から」 |

### 6. 設定を保存する <a href="#step-save-settings" id="step-save-settings"></a>

設定内容に誤りがないことを確認したら、<mark style="color:blue;">保存</mark> をクリックして連携を完了します。

連携が完了すると、ユーザーが WhatsApp でその電話番号宛にメッセージを送信した際に、AI アシスタントが自動的に返信します。

{% hint style="info" %}
連携が成功すると、対話プラットフォーム一覧でこの連携を確認できます。編集をクリックすると、機能オプション（OCR 認識、時間帯別応答、権限管理など）をさらに設定できます。
{% endhint %}


---

# 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/maiagent-user-guide/ja/serve/choose-channel/whatsapp.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.
