Skip to main content

Facebook Messenger

The Facebook Channel connects Anyy to a Facebook Page. Messenger events arrive through a signed webhook, and replies use the Page access token.

What You Need​

  • a Meta app with Messenger enabled;
  • a Facebook Page managed by that app;
  • the Page ID and App ID;
  • a Page access token;
  • an owner-chosen webhook verify token;
  • the Meta app secret; and
  • a public HTTPS route to the Anyy Gateway.

Use Meta's current Messenger Platform getting-started guide for app review, Page subscription, and permission requirements.

Connect in Dashboard​

  1. Open Dashboard → Channel → Add.
  2. Choose Facebook; the default entry uses Messenger webhook.
  3. Enter the Page ID and App ID.
  4. Add the Page access token, webhook verify token, and app secret.
  5. Save the account; change the DM policy through the CLI wizard when needed.
  6. Subscribe the Page to message events and complete the permissions shown by setup/doctor.

Enable the shared listener and HTTPS proxy as described under Webhook Platforms before registering the callback. The callback path is:

/channels/facebook/ACCOUNT_ID/webhook

The default account ID is page. Use the same verify token in Meta and Anyy.

Direct-Message Access​

Facebook Messenger uses direct-message policies: pairing, open, allowlist, or disabled. The Anyy profile does not expose Facebook group conversations.

anyy channel pairing list
anyy channel pairing approve --request REQUEST_ID

Choose Facebook in the interactive anyy setup channel wizard to edit policy. Dashboard has no policy or pairing-approval list, and current setup actions do not edit Facebook allowlist entries. Pairing authorizes that sender to reach the assistant: verify the Page and sender identity, approve through the CLI, then ask for a new message.

Verify the Connection​

anyy channel doctor facebook
anyy channel reload

Message the Page from a permitted account. Confirm the inbound event, pairing flow, and reply separately.

Test with a platform role first

Before app review or wider release, use a Meta account that has an appropriate role on the app/Page. This separates Anyy configuration problems from platform access restrictions.

Troubleshooting​

ProblemCheck
Meta cannot verify callbackHTTPS reachability and webhook verify token
Signed event is rejectedApp secret and reverse-proxy preservation of headers/body
Page receives but cannot replyPage access token and messaging permissions
Sender receives nothingDM policy, pairing/allowlist, Gateway status
Works for admins onlyMeta app mode, app review, and Page subscription