> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Facebook Messenger in Metorial for AI agents
URL: https://metorial.com/docs/integrations/meta-facebook-messenger
Last updated: 2026-11-24

Share Facebook Messenger with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or page access token sign-in, 10 tools (4 read-only).

---

To give your team Facebook Messenger in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Facebook Messenger integration in a Metorial portal, and each person signs in to Facebook Messenger with their own account. Agents can send and receive messages between Facebook Pages and users through Messenger. The integration has 10 tools, 4 read-only and 6 write, plus 3 triggers.

**What you will learn**

- How an admin shares Facebook Messenger in a portal and how each person connects
- The 4 OAuth scopes Facebook Messenger can request, and what each one allows
- How to keep the 4 read-only tools and reject the other 6

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Facebook Messenger for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **Page Access Token** | API token | `token` and `pageId` |
| **Facebook OAuth** (default) | OAuth | Signs in to Facebook Messenger after entering `pageId` |

The portal and `metorial setup` use **Facebook OAuth** unless someone picks another method.

### Page Access Token

To connect, a person enters these values:

- `token`: A valid Facebook Page Access Token
- `pageId` (optional): The Facebook Page ID associated with this token

### Facebook OAuth

Before the sign-in, setup asks for:

- `pageId` (optional): Facebook Page ID to obtain the access token for. If not provided, the first available page will be used.

People sign in to Facebook Messenger and approve the scopes you allow. The integration can request:

| Scope | Name | What it allows |
| --- | --- | --- |
| `pages_messaging` | Pages Messaging | Send and receive messages on behalf of a Page |
| `pages_manage_metadata` | Pages Manage Metadata | Configure the Facebook app to send webhook events |
| `pages_show_list` | Pages Show List | Query the list of Pages that a person manages |
| `pages_read_engagement` | Pages Read Engagement | Read Page content, follower data, and metadata |

### Setup settings

Whichever method you pick, setup also asks for:

- `pageId`: The Facebook Page ID to use for Messenger API calls
- `apiVersion` (optional): Graph API version to use (e.g. v24.0)

## Use your own Facebook Messenger OAuth app

With your own OAuth app, people see your company's name on the Facebook Messenger consent screen, and the client ID and secret belong to you.

1. **Start the credentials in Metorial**

   In the dashboard, select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**. Choose Facebook Messenger and copy the **Redirect URI**.

2. **Register the app with Facebook Messenger**

   Create an OAuth app or client in Facebook Messenger and add the redirect URI from Metorial as its redirect or callback URL.

3. **Finish in Metorial**

   Copy the app's client ID and client secret. Back in Metorial, enter a **Name**, the **Client ID** and the **Client Secret**, review **Scopes**, and select **Create**. Then pick these credentials for the Facebook Messenger integration.

## Admin: share Facebook Messenger in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Facebook Messenger. Under **Auth Method**, keep **Facebook OAuth** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to Facebook Messenger as themselves.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Facebook Messenger.

4. **Choose who gets it**

   Add the access groups that should see Facebook Messenger. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Facebook Messenger integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search "facebook messenger"
```

## Employee: connect Facebook Messenger

### In the portal

1. **Open Facebook Messenger in the catalog**

   Sign in to your portal and open Facebook Messenger. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A Facebook Messenger sign-in tab opens. Sign in and approve the permissions listed.

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search "facebook messenger"
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **Facebook OAuth**. To connect with **Page Access Token** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your Facebook Messenger connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list "facebook messenger"
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 4 read-only tools, such as `get_page` and `get_user_profile`, and lose the 6 write tools, such as `send_message` or `send_template`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list "facebook messenger"
metorial tools <integration-id>
metorial call <integration-id> get_user_profile -d '{"recipientId":"<recipient-id>"}'
```

`metorial tools` lists the 10 tools, minus any you rejected. `get_user_profile` needs `recipientId`, so replace the placeholders. It retrieves profile information for a Messenger user who has interacted with your Page.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (4)

- `get_user_profile`: Retrieve profile information for a Messenger user who has interacted with your Page. Needs `recipientId`.
- `get_page`: Get the Facebook Page this Messenger connection sends as: its Page ID, name, link, and picture.
- `list_conversations`: List the Page's Messenger conversations with each participant's Page-scoped ID (PSID).
- `list_conversation_messages`: List messages in a Messenger conversation, newest first, with sender, recipients, text, reply target, and attachment details.

### Write tools (6)

- `manage_messenger_profile`: Configure the Messenger experience for your Page. Needs `action`.
- `manage_thread_handover`: Control and inspect which app owns a Messenger conversation (Conversation Routing). **Pass** thread control to another app, **take** thread control, **request** control from the current owner, **release** control back to idle, **extend** the control period, get the current thread owner, or list secondary receiver apps. Needs `action`.
- `send_message`: Send a text message or media attachment to a Messenger user. Needs `recipientId`.
- `send_template`: Send a structured message template to a Messenger user. Needs `recipientId` and `templateType`.
- `send_sender_action`: Display a typing indicator, mark a conversation as read, or react to a message in a Messenger conversation. Needs `recipientId` and `action`.
- `upload_attachment`: Upload an image, video, audio file, or file URL to Messenger and receive a reusable attachment ID for later Send API calls. Needs `attachmentType` and `attachmentUrl`.

## Triggers

Facebook Messenger has 3 triggers, which fire on events in Facebook Messenger:

- `message_delivery_read`: Triggered when a message sent by the Page is delivered to or read by the user.
- `message_received`: Triggered when a user sends a message to your Page, including text messages, attachments, quick reply responses, and reactions.
- `account_handover_event`: Triggered for account linking/unlinking events, policy enforcement actions, and handover protocol events (pass, take, request thread control).

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Facebook Messenger there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Facebook Messenger on metorial.com](https://metorial.com/integrations/meta-facebook-messenger): the integration overview