# Messenger Messenger integration with Ritevo: connecting a Facebook Page, live customer messages, replying, attachments and reconnecting. The Messenger integration connects a Facebook Page to Ritevo. Messages customers send to the Page through Messenger land in the shared **Messages** inbox right away, and you reply from there. > **Required integration:** You need a Facebook Page and an account with full access to it. One integration is one Page. In Facebook's window tick exactly **one** Page - if you tick several, you see an error and nothing is saved. You connect several Pages one by one, each as a separate integration. Within one company account a Page can be connected only once: when you or a colleague connect it again, the existing integration is refreshed - even if it was deleted before - and no second one is created. Uniqueness: the integration is unique within the company by `externalId` and the type `MESSENGER`. Creating it again refreshes the existing integration instead of adding a new one: it sets `authError=false` right away, and `active=true` if the integration was inactive. With `authError` this is the only way to restore the connection. You connect Messenger through Facebook's sign-in window. You never give us your password - Meta passes on only the access you agree to in that window. ## Connecting the account Start from the integrations list: 1. Go to **Integrations** in the left panel and click **Add integration** in the top right corner. 2. In the **Messaging** section pick the **Messenger** tile. 3. Click **Connect with Facebook**. Facebook's window opens. 4. Sign in and tick **one** Page you want to connect. If you have connected your account with Facebook before, the window asks whether to continue with the previous settings - click **Edit settings** to pick another Page, or **Continue**. 5. Go back to the integrations window and wait a moment - do not close it. We connect the Page for receiving messages and open the new integration's settings. If something fails, you see the error returned by Facebook and nothing is saved. ![The integrations list in Ritevo with the Add integration button in the top right corner framed](https://ritevo.com/docs/integrations/en-integrations-list.webp) ![The Messenger add-integration screen with the note about picking one Page and the Connect with Facebook button](https://ritevo.com/docs/integrations/messenger/en-add.webp) ![The Facebook for business sign-in window asking whether to continue with the previous settings, with the Edit settings and Continue buttons](https://ritevo.com/docs/integrations/messenger/en-facebook.webp) > **Good to know:** If the Facebook window stays blank or freezes, close it and click the connect button again - it is a fault on Facebook's side. Then follow the steps in the Facebook window. ## Integration settings The integration is **Active** and receives messages right away - there is no fetching switch here, because Messenger delivers messages as they arrive. On the integration page you will find, read-only: - **Page name** - the name of the connected Facebook Page. - **Page ID** - the Page's id in Facebook. ![Messenger integration details: Page name and Page ID, read-only](https://ritevo.com/docs/integrations/messenger/en-details.webp) ![The Messaging section of the integrations list with the WhatsApp and Messenger tiles marked Active](https://ritevo.com/docs/integrations/messenger/en-list.webp) ## Messages from Messenger - **Conversation history** - Messenger does not share history, so we store the messages and attachments ourselves from the moment of connecting. You can read them even when the integration needs reconnecting - without a connection you only cannot send replies. - **Live** - a customer's message shows up in the inbox right away, with no waiting for the next check. - **Threads** - each conversation with one person is one thread of the **Message** type, labelled with the name from their profile. It is not linked to an order automatically. - **Page buttons** - when the customer taps a button set up on your Page in Messenger instead of writing (for example "Get started" or a menu item), the thread shows a message with that button's name. ## Replying to customers - **Right in the thread** - a sent reply shows in the thread right away, and its status changes once Messenger confirms it was sent. - **Attachment and text** - Messenger does not send a file and text in one message, so the customer gets two: the file first, then the text. - **24 hours** - Messenger lets you reply freely for 24 hours after the customer's last message. After that it rejects an ordinary reply and you see an error. From then on you can only write with messages carrying a special Meta tag (for example a human agent reply within 7 days) - we do not send such messages yet, so you can write again only once the customer writes first. ## Reconnection required This state appears when Facebook stopped accepting our access to the Page - for example after a password change, losing permissions to the Page or disconnecting the app in Facebook's settings. Until you reconnect, you cannot send replies from that Page. 1. Go through **Connecting the account** again and pick the **same** Page in Facebook's window. 2. The connection is refreshed in the existing integration - the history stays, no second integration is created. > **Good to know:** Reconnecting clears the **Reconnection required** state straight away and turns the integration on - also when it was deleted earlier. You do not need to restore it separately. In the API, reconnecting sets `authError=false` and `active=true` on the integration, also when it was deleted (`active=false`). Which endpoint does it for a given integration is described in the uniqueness note at the top of the page. ## Deleting the integration **Delete integration** turns the integration off in Ritevo: it stops fetching and sending data, but what it fetched earlier stays. **Restore integration** turns it back on. ## What the integration does not do - It does not fetch conversations from before the Page was connected. - It does not start conversations with customers - you reply in conversations the customer opened. - It does not send messages with a special Meta tag, so it cannot write to the customer after the 24 hours. - It does not handle post comments or Instagram messages. ## The Messenger integration through the API (for AI and integrators) This section exists only in the Markdown version. The integration has the type `MESSAGING` and the provider `MESSENGER`. Connecting needs Facebook's sign-in window in a browser, so the API alone cannot create the integration without a person. - `POST /integrations/messaging/messenger` - creates the integration from the result of Facebook's window: `code` (single-use authorization code) and `redirectUri` (the URL of the page that opened the window - it must match exactly). Connecting the same Page again refreshes the existing integration. - `GET /integrations/messaging/{integrationId}` - the integration: `accountName` (Page name), `externalId` (Page id), `active`, `authError` (true = **Reconnection required**). No access token. - `DELETE /integrations/messaging/{integrationId}` - **Delete integration**, `PATCH /integrations/messaging/{integrationId}/restore` - **Restore integration**. - Threads have `threadType` = `MESSAGE` and no linked order. You send a reply the same way as in other channels. This integration's endpoints are under `/integrations/messaging/messenger`, and the ones shared by the whole type (list, get one, delete, restore) under `/integrations/messaging`. The current paths, fields, types and response codes are always in Swagger: https://api.ritevo.com/api/v1/api-docs. Disconnecting the app on Meta's side: Meta does not notify Ritevo when access is removed. New messages stop arriving, and the integration gets `authError=true` on the first request to Meta, for example when sending a reply. The stored conversation history stays. --- All help in one file: https://ritevo.com/llms-full.txt. Help map with links to every page: https://ritevo.com/llms.txt.