ChatHub/docs

Search documentation

SUGGESTED FOR YOU200 results

Search published articles · By section

Create a Facebook app and connect a Page to ChatHub

Create the right kind of Meta app, connect your Facebook Pages, collect the App ID, app secret and admin token, then enter them in ChatHub to receive Messenger conversations.

What this guide covers#

For ChatHub to receive and answer Messenger conversations from a Facebook Page, you need your own Meta app. ChatHub uses no shared app: every installation declares its own, so you never wait on Meta's review and a problem with one Page never affects another installation.

You configure the app once for the whole system, then add as many Pages as you like. The app secret is shared because it belongs to the app; each Page's own token is fetched from Meta by ChatHub, so you never collect those by hand.

You need admin access to the Facebook Page you want to connect, and ChatHub administrator rights to open the Settings screen.

1. Create the app on Meta for Developers#

  1. 1

    Open developers.facebook.com and sign in with the Facebook account that administers the Page.

  2. 2

    Go to My Apps and press Create app.

  3. 3

    On the App details step, name the app after your brand. People see this name when they grant permissions, so avoid test names.

  4. 4

    Check the contact email: Meta sends violation warnings and policy notices to this address.

Step 1 of the creation flow. The name field holds sample data and Next has not been pressed; the contact email is masked in the image. Vietnamese interface.

2. Pick the Messenger use case#

This step decides everything else. Meta grants permissions based on the use case you declare at creation, and an app created for something else cannot add Messenger later.

  1. 1

    On the Use cases step, filter by the Business messaging group in the left column.

  2. 2

    Tick Interact with customers on Messenger from Meta, then press Next.

  3. 3

    The Business step can be skipped when the list is empty; you can link a business portfolio later.

  4. 4

    On the Overview step, review and press Create app. Meta asks for your Facebook password before creating it.

Pick the Business messaging group on the left, then tick the checkbox on the Messenger row. Vietnamese interface.
If you open an older app and the Business messaging group is missing under Add use case, that app will not take Messenger. Meta says so in the dialog itself: create a new app. Do not spend time looking for a way to enable it.

3. Collect the App ID and app secret#

  1. 1

    In the new app, open App settings and choose Basic.

  2. 2

    Copy the App ID. This value is public, not a secret.

  3. 3

    Next to App secret, press Show and copy the value. Meta asks for your password again.

The App ID sits on the left and the app secret on the right, hidden behind a Show button. The contact email is masked in the image. Vietnamese interface.
The app secret lets anyone forge messages into your system. Do not send it over chat, store it in shared documents, or commit it to source control. If it leaks, rotate it on this same screen.

4. Connect Facebook Pages to the app#

A Page has to be connected to the app before ChatHub can see it and before its webhooks arrive.

  1. 1

    In the app, open Use cases and press Customise on the Messenger row.

  2. 2

    Choose Messenger API settings in the left column.

  3. 3

    Scroll to Generate access tokens and press Connect, or Add page if some Pages are already listed.

  4. 4

    Sign in to Facebook in the window that opens, pick the Pages you want and confirm the permissions.

Once connected, each Page gets a row with its Page ID, an Add subscriptions button for webhooks and a Generate button for the token. Page names and UIDs have been blurred in the image. Vietnamese interface.

5. Get the admin access token#

ChatHub uses this token for exactly one thing: asking Meta which Pages you manage and fetching each Page's own token. Page tokens obtained this way do not expire, so the admin token expiring later never takes a running channel down.

  1. 1

    Open Tools and choose Graph API Explorer; in the Meta app selector, pick the app you just created.

  2. 2

    Under Permissions, add three: pages_show_list, pages_messaging and pages_manage_metadata.

  3. 3

    Press Generate Access Token, confirm the permissions for your Pages, then copy the token.

The three required permissions appear under Permissions. The access token box is masked in the image because it holds a real value. Vietnamese interface.
If the permission list has no pages group, check the app selector just above it: you are almost certainly on an older app that does not declare Messenger.

6. Enter the app in ChatHub#

  1. 1

    In ChatHub, open Settings and choose the Channels group.

  2. 2

    Find the Facebook app card and fill in the App ID, app secret and admin access token.

  3. 3

    Press Save. The badge in the card's corner switches to Configured.

  4. 4

    Right below those fields sits Register the webhook with Meta, holding the Callback URL and Verify Token with a Copy button each. Both are shared by the whole system, which is why they are not inside an individual channel.

The Facebook app card under Settings → Channels. Captured with only the App ID filled in and nothing saved; both secret fields are empty. Vietnamese interface, dark theme.
The app secret and token are encrypted before storage and never shown again. Leaving a field empty on a later save keeps the stored value.

7. Add the Page as a channel and register the webhook#

  1. 1

    In Settings → Channels, copy the Callback URL and Verify Token from Register the webhook with Meta.

  2. 2

    Go to the app's Messenger API settings, paste both into Callback URL and Verify token, then press Verify and save. This is done once for the whole app.

  3. 3

    In the Webhook fields table right below the fields you just saved, flip the Subscribe toggle for exactly three fields: messages, messaging_postbacks and message_echoes. Skip this and Meta sends nothing, even though everything else shows green.

  4. 4

    Back in ChatHub, open the Channels screen, press Add account and choose the Facebook type.

  5. 5

    The Pages you manage are listed straight away; pick one and press Create account.

  6. 6

    Press Connect on the new channel. Adding a second Page only repeats the last two steps — the webhook is already registered.

All five Meta configuration rows sit together; below them are the messages, messaging_postbacks and message_echoes webhook fields that each Page needs. The real Verify Token is fully masked. Vietnamese interface, light theme.
Both fields sit under section 1, Configure webhooks. Captured empty and unsaved. Vietnamese interface.
The three toggles to flip in the Webhook fields table: message_echoes, messages and messaging_postbacks turn blue as Subscribed while every other field stays unsubscribed. Vietnamese interface.
Meta only calls webhooks over public HTTPS. A system on an internal domain or localhost will connect but never receive a message; point it at an address reachable from the Internet before this step.

See the guide for adding the other channel types ↗

8. Register the privacy URL and switch the app to Live#

After the seven steps above ChatHub and Meta are wired together correctly, but a newly created app always sits in Development mode. In that mode Meta only sends webhooks for people who hold a role on the app: a test message from your admin account arrives fine, while a real customer writing to the Page produces no event at all — the channel still shows Connected and the inbox stays empty.

  1. 1

    In ChatHub, open Settings → Channels, scroll to Register the webhook with Meta and click Copy on the Privacy policy URL row. ChatHub serves that page itself at /privacy, reachable without signing in so Meta's crawler can read it.

  2. 2

    In your Meta app, open App settings → Basic, paste the address into the Privacy Policy URL field and press Save changes. While that field is empty Meta keeps the Publish button disabled.

  3. 3

    In the app's left menu, open Publish, review the use cases, then press Publish in the bottom-right corner. Once publishing succeeds, the Publish row shows Published; do not press Unpublish afterwards.

  4. 4

    Open App Review → Permissions and Features and check that pages_messaging sits at Advanced Access. If it is still Standard, complete Business Verification for the Business Portfolio that owns the app, or submit the permission for review.

  5. 5

    Ask someone with no role on the app to message the Page. The message must appear in the ChatHub inbox within seconds.

Paste the privacy-policy address into this field. The image uses the example value https://ten-mien-cua-ban.example/privacy and Save changes has not been pressed; the contact email and app secret are fully masked. Vietnamese interface.
Open Publish in the left menu, review the use cases, then press Publish in the bottom-right corner. The Published badge on this row confirms that the app is live; do not press Unpublish. Captured after publishing, Vietnamese interface.
If your company already has its own privacy policy page, register that address instead; the row in ChatHub is only there so you do not have to build a page from scratch.
Two signs the app is still stuck in Development mode: customers write but the server log records no webhook call at all, and messages to strangers come back from Meta as error 551. Do not go looking for a wrong Callback URL or verify token — those are fine.

Limits worth knowing up front#

Messenger only allows a free-form reply within 24 hours of the customer's last message. After that Facebook rejects outgoing messages until they write again. ChatHub warns on the composer when the window is closing and when it has closed; internal notes still save normally.

A few other platform limits: Messenger has no quoted replies on outgoing messages, cannot send arbitrary stickers, and buttons must ride on a message with text, so a bare file with no caption has nowhere to carry them.

An app in development mode only works with people who hold a role on it — in both directions: messages from outside accounts produce no webhook at all, so test with the admin account or add testers under App roles. To serve real customers, follow step 8 above.
Create a Facebook app and connect a Page to ChatHubBack to top
© 2026 ChatHub DocsPowered by CMSNT LTDA guide to using ChatHub.