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 → ChannelAdd account.
  2. Choose Facebook and Messenger webhook.
  3. Enter the Page ID and App ID.
  4. Add the Page access token, webhook verify token, and app secret.
  5. Review the DM access policy and save.
  6. Subscribe the Page to message events and complete the permissions shown by setup/doctor.

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

Pairing authorizes that sender to reach the assistant. Verify the Page and sender identity before approval.

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