All channels

Facebook Messenger

Connect a Facebook Page so people who message it on Messenger are answered by your governed flow. Channel key: messenger.

What you need

  • A Facebook Page you administer.
  • A Meta app with the Messenger product (https://developers.facebook.com/apps).
  • From the App Dashboard: the Page ID, a Page access token and the App secret.
  • App Review for pages_messaging before people without a role on the app can message the Page (development mode works for admins/testers).

Official documentation

Set up on Meta

  1. Create the app: developers.facebook.com → Create App → type Business → add the Messenger product.
  2. Messenger → Messenger API settings: under Access tokens click Add or remove Pages, pick your Page, then Generate token → copy the Page access token (needs pages_messaging, pages_manage_metadata).
  3. Page ID: shown next to the Page in the same panel (or Page → About).
  4. App secret: App settingsBasicApp secretShow.
  5. Webhook: Messenger API settings → WebhooksConfigure: paste the Callback URL and Verify token from Tools Anatomy, Verify and save. Then Add subscriptions for the Page: messages and messaging_postbacks (optionally message_reactions).
  6. Submit App Review for pages_messaging and switch the app to Live when you want the public to reach the bot.

Connect in Tools Anatomy

  1. /channelsMessaging channelsFacebook MessengerConnect.
  2. Fill in Page ID, Page access token, App secret; leave Verify token empty to have one generated.
  3. Connect validates the token (GET /me?fields=id,name must return your Page) and shows the Callback URL + Verify token to paste into the webhook configuration. The GET handshake echoes hub.challenge; each POST must carry a valid X-Hub-Signature-256 (HMAC-SHA256 of the raw body with the App secret) or it is rejected with 401.

Identity we derive

Canonical key Source Notes
external_user_id <page_id>:<PSID> the PSID is Page-scoped, hence the prefix
channel messenger
display_name — (profile requires an extra Graph call/permission)
phone_number / email

conversation_context.channel_account_id = the Page ID. Thread = the PSID.

Limits

  • 24-hour standard messaging window: the Page may reply with messaging_type: RESPONSE for 24 h after the person's last message; later replies need message tags and are not sent by this channel.
  • Text is split at 2000 characters.
  • Attachments (images, files, audio, stickers) arrive as attachments; the flow answers text-only. Postback buttons arrive as the button title.
  • Echoes (is_echo), delivery and read receipts are ignored; deliveries are deduplicated on message.mid.

Test it

While the app is in development mode, message the Page from an account that has a role on the app (admin/developer/tester). Use the Page's Inbox to see both sides.

Troubleshooting

  • "the Page access token belongs to a different Page" — the token was generated for another Page; regenerate it for the Page ID you entered.
  • Webhook verification fails — Callback URL/verify token mismatch; also make sure the gateway is reachable on HTTPS.
  • Bot answers testers but not the public — App Review for pages_messaging is missing or the app is not Live.