> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihive.global/llms.txt
> Use this file to discover all available pages before exploring further.

# Messenger Integration

> Messenger Integration - AI Hive Documentation

# Messenger Integration

**Connect Facebook Messenger** is the standard process to integrate AIHive with your Fanpage, enabling the Bot to automatically respond to customer messages.

***

## Implementation Process

### Step 1: Publish Agent

Before connecting, ensure your Agent is ready.

1. On the Agent configuration interface, click the **Publish** button in the top right corner.
2. The system will save all your latest Prompt, Knowledge, and Tools configurations.

<img src="https://mintcdn.com/nhatvk/A4aF2oHwToUyYIx5/images/channels/channels-07d852d4.png?fit=max&auto=format&n=A4aF2oHwToUyYIx5&q=85&s=dc105eac4e6150eb3cf20d1bfa8f313c" alt="image.png" width="2182" height="1393" data-path="images/channels/channels-07d852d4.png" />

### Step 2: Access the Integration Menu

1. In the left menu bar, find and click on **Integrations** (or *Channels* depending on the version).
2. Find the **Facebook Messenger** card.

<img src="https://mintcdn.com/nhatvk/A4aF2oHwToUyYIx5/images/channels/channels-6bc3ccc3.png?fit=max&auto=format&n=A4aF2oHwToUyYIx5&q=85&s=1b96251c8e94a5c05e732ee942135f22" alt="image.png" width="2172" height="1380" data-path="images/channels/channels-6bc3ccc3.png" />

### Step 3: Login to Facebook

1. Click the **Connect** button on the Facebook card.
2. A popup window appears. Click **"Continue as..."** to log in with the personal Facebook account that manages the Fanpage.

<img src="https://mintcdn.com/nhatvk/A4aF2oHwToUyYIx5/images/channels/channels-57f0ae39.png?fit=max&auto=format&n=A4aF2oHwToUyYIx5&q=85&s=2bf4fa81a6c7b0794a3c0bee2b65c69a" alt="image.png" width="1024" height="574" data-path="images/channels/channels-57f0ae39.png" />

### Step 4: Grant Page Management Permission (Important)

This is the most critical step.

1. Select **"Edit previous settings"** (if you've connected before) or select from the new Page list.
2. **Crucial:** Check the box **"Apply only for the current Page"**.
3. Tick the exact **Fanpage** you want to integrate this Agent with.
4. Click **Next** and grant all required permissions (Manage Page, Send Messages...).

> ⚠️ Note: If you do not grant full permissions, the Bot may not be able to read or reply to messages.

<img src="https://mintcdn.com/nhatvk/A4aF2oHwToUyYIx5/images/channels/channels-78eab567.png?fit=max&auto=format&n=A4aF2oHwToUyYIx5&q=85&s=2fbc07fe817bea981d7baa3a509082e8" alt="image.png" width="2389" height="1357" data-path="images/channels/channels-78eab567.png" />

<img src="https://mintcdn.com/nhatvk/DVLDCi-NhXS0bs-l/images/channels/channels-fc81c997.png?fit=max&auto=format&n=DVLDCi-NhXS0bs-l&q=85&s=a4d9403f822009f2e43c3583ccb6342d" alt="image.png" width="1831" height="948" data-path="images/channels/channels-fc81c997.png" />

### Step 5: Complete

1. After granting permissions, click **Save** / **Done**.
2. Return to the AIHive screen, you will see the Fanpage status change to **Connected** (Green).

<img src="https://mintcdn.com/nhatvk/DVLDCi-NhXS0bs-l/images/channels/channels-ecc7c598.png?fit=max&auto=format&n=DVLDCi-NhXS0bs-l&q=85&s=facf577c7701c731dd88c6e9a86b6ef8" alt="image.png" width="2537" height="1367" data-path="images/channels/channels-ecc7c598.png" />

***

## Testing

After a successful connection, verify the integration:

1. Open the **Facebook** or **Messenger** app on your phone.
2. Go to the connected Fanpage.
3. Act as a customer and send a test message (e.g., *"Hello"*).
4. If the Bot responds immediately -> **You've succeeded!** 🎉
