ChatbotX icon indicating copy to clipboard operation
ChatbotX copied to clipboard

Messenger/Facebook connect fails with "Invalid Scopes: page_events" on new Meta apps (use-case dashboard)

Open rancaHoratiu opened this issue 1 month ago • 1 comments

Self-hosted ChatbotX, Messenger channel.

When connecting a Facebook Page, the Facebook login dialog fails with:

Invalid Scopes: page_events. This message is only shown to developers.

The scope list in integrations/messenger/src/apis/auth.ts (MESSENGER_SCOPES, used by generateAuthUrl) always includes page_events, and auth_type=rerequest is set. In the current Meta app dashboard (use-case based, no manual "Permissions and Features" page), page_events is not available under any use case I could add:

  • Instagram,
  • Messenger,
  • Manage everything on your Page,
  • Create & manage ads with Marketing API,
  • Capture & manage ad leads,
  • Measure ad performance data,
  • Track engagement with Meta App Events.

All other scopes (including pages_manage_ads, pages_read_user_content, pages_manage_engagement, pages_utility_messaging, email) can be added and are accepted.

In the codebase page_events is only used for the Conversions API / ads feature (hasPageEventsScope, messengers/[id]/ads), and it is already excluded from MESSENGER_REUSE_REQUIRED_SCOPES. So comment-to-DM and messaging do not need it.

Request: request page_events only when the Conversions API feature is enabled (or make it opt-in via an env/credential setting), so new apps can connect a Page.

rancaHoratiu avatar Oct 15 '26 16:10 rancaHoratiu

We'll look into it and update you soon.

viethung0o0 avatar Oct 16 '26 04:10 viethung0o0