FabricFabricHarness
EcosystemChannels

Facebook Messenger

Connect Meta Messenger webhooks to persistent Fabric agents.

fh add channel messenger
import { createMessengerChannel } from '@fabric-harness/channels/messenger';

export default createMessengerChannel({
  appSecret: process.env.MESSENGER_APP_SECRET!,
  verifyToken: process.env.MESSENGER_VERIFY_TOKEN!,
  agent: 'support',
});

Configure both GET and POST /channels/messenger/webhook. GET answers Meta's verification challenge; POST verifies X-Hub-Signature-256, uses message IDs for deduplication, propagates Page and sender identity, and suppresses Page echo events.

Use replyInMessenger(ref, { pageAccessToken }) for a governed Send API tool.

Keep Page tokens host-side and live-test webhook subscription, permissions, token rotation, retries, and deletion/privacy handling.