Facebook Messenger setup
A complete walkthrough to connect your Facebook Page's Messenger inbox to MsgHub via the Meta Graph API. Customer DMs to your Page route into your unified inbox, the AI replies automatically, and you handle escalations from one place across WhatsApp / Instagram / Messenger.
Overview
Facebook Messenger remains a high-intent channel for customers who came in via Facebook Ads, browsed your Page, or used the "Message" button on your Marketplace listing. The Messenger Platform API lets MsgHub read those DMs, send replies, and route them to AI or human agents like any other channel.
Five parts to setup:
- Page side — confirm you have a Facebook Page and admin access.
- Meta App — add Messenger product, get Page ID, generate Page Access Token.
- MsgHub — paste credentials.
- Webhook — point Meta at MsgHub and subscribe to message events.
- Test & Live — verify with role-based testers, then submit for App Review for public launch.
Prerequisites
- A Facebook Page for your business. Create one at facebook.com/pages/creation if you don't have one.
- Admin access to that Page in Meta Business Manager.
- A Meta App — reuse your WhatsApp/IG one or create a new Business-type app at developers.facebook.com/apps.
- An active MsgHub tenant account.
Part 1 · Set up the Page side
Confirm Page admin and messaging are enabled
- Open your Page in Meta Business Suite.
- Settings → Page roles → ensure your account is listed as Admin. Editor/Moderator roles won't generate tokens with messaging permissions.
- Page settings → Messaging → ensure Allow people to contact my Page privately by showing the Message button is ON.
Part 2 · Configure Meta App for Messenger
Add the Messenger product to your Meta App
- Open your Meta App at developers.facebook.com/apps.
- From the dashboard, click Add Product.
- Find Messenger → click Set up.
- You'll see a new "Messenger" item in the left sidebar with sub-sections for Settings, Webhooks, Templates, Roles.
Find your Facebook Page ID
Three ways:
- From the Page itself: Page → About → scroll to Page transparency → numeric Page ID.
- From Business Manager: Settings → Pages → click your Page → ID is shown in the header.
- From your Page URL: if the URL is
facebook.com/123456789, the number is your Page ID. If it's a vanity URL likefacebook.com/AcmeRetail, use one of the methods above.
Save the numeric ID — looks like 123456789012345.
Generate a Page Access Token
Page Access Tokens authorise sending and receiving messages on behalf of your Page.
- In your Meta App: left sidebar → Messenger → Settings (or API Setup depending on dashboard version).
- Under Access Tokens, click Add or Remove Pages → select your Page → grant the permissions Meta requests.
- Your Page appears in the access token list. Click Generate Token.
- Copy immediately and store securely — looks like
EAAGm....
Page Access Tokens are long-lived when generated from the App dashboard while logged in as a Page admin — they don't expire on a typical timeline. Tokens generated via Graph API Explorer expire in 60 days unless extended.
Also grab your App Secret: left sidebar → Settings → Basic → App Secret → Show. Same App Secret used for WhatsApp and Instagram in this app.
You should now have three pieces of information collected:
| Credential | Source |
|---|---|
Facebook Page ID | Page About or Business Manager → Pages |
Page Access Token | Meta App → Messenger → Settings → Generate Token |
App Secret | Meta App → Settings → Basic |
Part 3 · Connect Messenger to MsgHub
Paste credentials into MsgHub
- Login to
https://app.msghub.info. - Click Settings at the bottom of the sidebar.
- Scroll to the WhatsApp Configuration section — inside it, find the Facebook Messenger sub-section.
- Paste the credentials below and choose a Webhook Verify Token (any random string).
- Above, in the Meta App Credentials sub-section, ensure Meta App ID + Meta App Secret are set. These are shared across all Meta channels (WA / IG / FB).
- Click Save.
| MsgHub field | Section | Paste from |
|---|---|---|
| Meta App ID | Meta App Credentials | Meta App → Settings → Basic |
| Meta App Secret | Meta App Credentials | Meta App → Settings → Basic (used for webhook HMAC) |
| Facebook Page ID | Facebook Messenger | Page numeric ID |
| Page Access Token | Facebook Messenger | From Meta App Messenger Settings (Step 4) |
| Webhook Verify Token | Facebook Messenger | You make this up |
Part 4 · Point Meta's webhook at MsgHub
Copy your Messenger webhook URL
The Your Webhook URL field in the Facebook Messenger sub-section is read-only and auto-generated:
https://app.msghub.info/api/webhooks/messenger/{your-tenant-id}
Configure the webhook in Meta
- Meta App dashboard → Messenger → Webhooks (or "Configuration" in some dashboard versions).
- Click Add Callback URL.
- Paste the Callback URL from MsgHub.
- Paste the Verify Token (must exactly match what you saved in MsgHub).
- Click Verify and Save. Meta hits your URL with a challenge — MsgHub responds, green tick appears.
Subscribe to message webhook fields
Saving the URL alone isn't enough. Subscribe to events:
messages— inbound customer DMs (the main one)messaging_postbacks— button taps in your Messenger UImessage_deliveries— delivery receipts (optional)message_reads— read receipts (optional)
Then subscribe your Page to the app: still on the Webhooks page, scroll to Page subscription → pick your Page → Subscribe. This step is easy to miss.
Two separate subscriptions, both required: (1) webhook fields (events MsgHub receives), and (2) Page subscription (the Page this webhook is bound to). If only (1) is done you get a green Verify tick but no events fire.
Part 5 · Send your first test message
Test as an admin or role-tester
Until your Meta App passes App Review, only people with a role in the App (Admin, Developer, Tester) can DM your Page through the API. Random Facebook users can DM but the events won't fire for your webhook.
From a Facebook account that is an Admin or Tester on your Meta App:
- Open Messenger or Facebook.com.
- Search for your Page → click Message.
- Send "hi".
The message should appear in MsgHub Inbox → Facebook Messenger within seconds. A new contact is created automatically.
To add testers: Meta App → Roles → Roles → Add Testers. Tester accepts the invite from their Facebook notifications.
Test outbound
Reply from MsgHub Inbox. Within the 24-hour customer service window, free-form replies are allowed. The message arrives on the tester's Messenger within seconds.
Going live · App Review
Role-based testing is fine for piloting. To accept DMs from the general public, your Meta App needs App Review for the pages_messaging permission (and any others you use).
What Meta reviews
- App use case — written description of what your business does with Page DMs.
- Demo video — 1–2 minute screen recording from a real Facebook user account showing a DM, your reply, and how customer data is handled.
- Privacy policy URL — publicly accessible.
- Terms of service URL.
- App icon and Business Verification (status visible at Meta Business Suite → Verification).
Submitting
- Meta App dashboard → App Review → Permissions and Features.
- For
pages_messaging(andpages_manage_metadataif you used it), click Request. - Fill the rationale, upload demo video, link policies.
- Submit. Approval typically 3–7 business days.
If you've already passed App Review for WhatsApp or Instagram on the same app, adding Messenger only needs review of the additional permission — usually approved within 24 hours since your app is already a known good actor.
24-hour customer service window & message tags
Same model as WhatsApp and Instagram. Once a customer messages your Page, you have 24 hours to reply with any free-form message. After that:
- HUMAN_AGENT tag — extends to 7 days for human agent handling. Useful when a customer service issue takes more than 24 hours.
- CONFIRMED_EVENT_UPDATE tag — for reminders about appointments / events the customer registered for.
- POST_PURCHASE_UPDATE tag — for order/shipping updates following a purchase.
- ACCOUNT_UPDATE tag — for account-related notifications.
Generic marketing pushes after 24 hours are not allowed. Meta's policy is strict here; mass-violators get permanent restriction.
Troubleshooting
"Webhook verification failed" in Meta
- Verify Token in Meta doesn't exactly match the one saved in MsgHub. Re-copy and paste fresh — no trailing whitespace.
- Callback URL missing tenant ID. Must look like
/api/webhooks/messenger/{tenant-id}.
Page subscription is the missing piece
- You verified webhook fields but forgot to subscribe the Page to the app. Two separate steps inside Meta. Go back to Step 8 above.
Inbound DMs don't appear in MsgHub
- You're in Standard Access and the sender isn't an App role-tester. Add them as Tester.
- Page messaging is disabled in Page settings — re-enable the Message button.
- Page Access Token was generated when your account had Editor role, not Admin. Re-promote to Admin and regenerate.
"Invalid OAuth access token" when sending
- Token revoked or expired (rare for long-lived Page tokens, possible if Page role changed).
- Page Access Token mismatched with Page ID — they must be a matched pair.
- Regenerate from Step 4 above.
"This user can't receive a message from this app" error on outbound
- User has blocked your Page.
- You're outside the 24-hour window and not using a valid message tag.
- User is not an App tester (in Standard Access mode).
FAQ
Do I need a Facebook Page if I only want Instagram and WhatsApp?
For WhatsApp: no. For Instagram: yes (Instagram messaging requires a connected Page even if you never post on Facebook). For Messenger: obviously yes. The Page can be empty — only its existence and admin connection matter.
Can I share one Meta App across WhatsApp, Instagram, and Messenger?
Yes, and we recommend it. One Meta App holds all three channel products. App Secret is shared, webhook signature verification works the same way, and App Review only needs to happen once.
What's the difference between Page Access Token and System User token?
Page tokens are tied to a specific Page and don't expire when generated from the App dashboard. System User tokens are tied to an app-level user and used for WhatsApp/Instagram. For Messenger, the Page token is the typical choice.
Can I respond to comments on Page posts via MsgHub?
Not via Messenger setup alone — that's a separate Page API permission. Comment responses are on our roadmap but not currently exposed via MsgHub.
What's the throughput limit on Messenger?
Meta caps at ~250 messages/second per Page at standard rate; can be raised on request. For India business volumes, you won't hit this.
Can the AI handle Messenger DMs?
Yes. The AI handles Messenger DMs through the same chatbot flow as your other channels — see AI Training for how to wire the chatbot flow and knowledge base.
Does Messenger support audio, video, location messages?
Yes — Messenger supports text, image, audio, video, file, location, and template messages. MsgHub surfaces all of these in the unified inbox. Outbound, you can reply with text, image, document.