Facebook Messenger integration configuration for Chatwoot

To use the Facebook channel, you need to create a Facebook app in the developer portal. Below are the detailed setup steps for Self-hosted.


1. Prerequisites

  • Valid Facebook account.
  • Active Facebook Page.

2. Register Facebook App

Access Facebook Developer Portal and click the button “Create App”.

Create Facebook App

Setup steps for app type:

    • Select the option “Other”.
Select type Other

 

    • For app type, select “Business”.
Select Business App

 

    • Enter basic information such as app name and contact email.
Enter app information

 

After registration, save App Id and App Secret in the settings section for use with Chatwoot.

Get App ID and Secret

 

3. Configure Environment Variables in Chatwoot

Update the following values in your configuration file. FB_VERIFY_TOKEN should be a random and secure string.

FB_VERIFY_TOKEN=your_secure_token
FB_APP_SECRET=your_facebook_app_secret
FB_APP_ID=your_facebook_app_id

* Don't forget to restart the Chatwoot server after updating.

4. Configure Facebook Login

Add Product Facebook Login in the app dashboard.

Add Facebook Login

 

Enable Web OAuth Login, Login with Javascript SDK and enter your domain in the field Allowed Domains.

Configure SDK Login

 

5. Set up Messenger and Webhook

Add the domain where Chatwoot is installed to App Domain in the general settings section.

Configure App Domain

 

Add Product Messenger and configure Callback URL.

Add Messenger Product

 

Fill in the Callback URL in the format: {domain_cua_ban}/bot and enter the corresponding Verify token.

Configure Callback URL

 

Warning: Ensure the Facebook app subscription version is 17.0. Update in the Webhooks options if necessary.

6. Go to Production

Before going live, you need to request Advanced Access for the following permissions:

  • pages_messaging (Messaging on behalf of the page)
  • pages_show_list (List pages)
  • pages_manage_metadata (Register webhook)
  • business_management
  • pages_read_engagement (Read user profile data)
API Version

 

DPS.MEDIA