Messenger Guide

Facebook Messenger chatbot with Ragbee

Answer your Page's messages from your own documents — policies, FAQs, shipping info, product docs. Setup takes minutes, credentials are stored encrypted, and every reply is grounded in your workspace documents with sources.

What you need
  • A Ragbee account with a workspace and at least a few documents uploaded
  • A Facebook Page you administer (the bot answers as that Page)
Two ways to connect
  • Path A — Hosted (recommended): one click, no Meta developer account needed
  • Path B — Your own Meta app: full control, works with any Page and any Meta app you own
PATH A · HOSTED

One-click connect

1 Create the integration

In your Ragbee dashboard go to Chatbots → Integrations → New chatbot integration. Choose platform Messenger, give it a name, and save.

2 Click "Connect Facebook"

The Connect Facebook button appears on your Messenger integration. Log in with the Facebook account that manages your Page, approve the permission prompt, and Ragbee automatically stores your Page ID and a fresh Page Access Token — encrypted, no copy-pasting.

3 Give the bot its documents

Create a chatbot definition for the integration (the dashboard prefills a Messenger-ready persona). Point it at the workspace whose documents it should answer from.

4 Send a test message

Message your Page from any Facebook account that's allowed by your app's mode. The bot replies in seconds, with sources. Conversations, events, and delivery status all show up in your dashboard.

Your Page token is refreshed automatically when you reconnect — if a token ever expires or you rotate it, just click Connect Facebook again.
PATH B · YOUR OWN META APP

Bring your own Meta app

Prefer your own Meta developer app? Ragbee verifies Meta's webhook signatures and challenges against your app credentials — nothing shared with anyone else.

1 Create your Meta app

At developers.facebook.com create an app (Business type), then add the Messenger use case/product. Connect the Facebook Page the bot will answer for.

2 Register the webhook

In your Meta app: Messenger → Settings → Webhooks → Edit (in the newest dashboard: Use cases → Messenger first, then the Webhooks panel). Use:

  • Callback URL: https://bots.ragbee.ai/webhooks/messenger
  • Verify token: a token you choose
  • Then subscribe to the messages webhook field
The webhook fields only appear after the Messenger product/use case is added. A lone "Authorize callback URL" field under Settings → Basic is not it — the webhook form always shows a Callback URL and a Verify Token together.
3 Fill the four fields in Ragbee

Chatbots → Integrations → new (or edit) a Messenger integration:

  • Facebook Page ID — numeric Page ID (required)
  • Facebook Page Access Token — generate one in your Meta app's Messenger → Settings (Token Generation), or use the Connect Facebook button
  • Facebook App Secret — your app's secret from Settings → Basic (required for Path B)
  • Facebook Webhook Verify Token — the same token you entered in step 2 (required for Path B)
4 Save and test

Ragbee verifies Meta's signed webhook events against your app secret and routes messages to your workspace by Page ID. Message the Page and the bot answers.

Going public

Development vs Live mode

While your Meta app is in Development mode, only app admins/testers/developers can chat with the bot — perfect for testing. To let everyone message it, switch the app to Live (top of App Settings → Basic). Facebook may require App Review for the pages_messaging permission for apps owned by business organizations; personal developer apps usually go live without review.

Good to know
  • 24-hour window: Messenger bots can only reply within 24 hours of a person's last message — standard for support bots
  • Replies are grounded in your workspace documents only; Ragbee's channel policy keeps personal or sensitive account data out of chat and routes those conversations to your official channels
  • All Page tokens and app secrets are stored encrypted at rest
  • One webhook serves every integration — routing is by Page ID, so you can run several Pages/bots

Troubleshooting