Configuring Facebook

Introduction

Facebook integration enables your agents to respond to your Facebook Page messages directly from 3CX without logging into Facebook Messenger. Messages can be delivered to a call queue, ring group, or single extension. Agents can take ownership of a message or transfer it to another agent or group.

A verified Facebook Business account is required.

Step 1: Create a Facebook Application

  1. Navigate to https://developers.facebook.com and click Log In on the top right.
  2. Navigate to My Apps.
  3. Click “Create App.
  4. Give your application a display name, enter a contact email then click Next.
  1. Select the option Other then click Next.
  2. Select Business.
  3. Before creating the App, make sure that the App name and the App contact email are correct, and use the drop-down list to select your business portfolio. Click Create app.
  4. Select Messenger and then Set up.

  1. The next screen will offer you to add products to your app. Scroll down to Messenger and click Messenger API Settings.
  2. Under Messenger API Setup, scroll down to the ‘Generate access tokens’ section and click Connect.
  3. Click Continue as (username) then choose the Page(s) you want to integrate using the checkbox.
  4. Click Next and complete the following confirmation messages.
  5. You will now see your Facebook Page listed in the ‘Access Tokens’ section.
  6. Click Generate token. In the pop-up box, tick the ‘I Understand’ box and copy the token to a notepad, click Done.
  7. Finally, copy the Page ID (shown below your page name) to a notepad.

Step 2: Configure in 3CX

  1. Log into your 3CX Web Client and navigate to Admin > Voice & Chat and click + Add Facebook.
  2. Edit the default name to your preferred name.
  3. If you are a ‘System Owner’ or a ‘System Admin’, you can make the integration available system wide or just for the group.
  4. Paste your ‘Page ID’ and ‘Access token’ taken during step 1.
  5. Copy the 3CX Webhook to a notepad and click Save.
  6. Go to Users and create a temporary test user that will be used for the application review process in step 4 below.
  7. Ensure the messaging routing is configured to your new temporary test user. For more information on this, check the call handling manual.

Step 3: Configure Your Webhook

  1. Navigate back to the ‘Meta’ for Developers portal.
  2. Go back to Apps > Select and Edit your app > Messenger API Settings > Configure webhooks..
  3. Paste your 3CX generated webhook into the ‘Callback URL’ section.
  4. To verify the token, enter a random string of letters and numbers. This will not be needed again so there is no need to save your string for a later date. Click Verify and save.


  1. Click Add subscriptions from the ‘Generate Access Tokens’ section and select the following checkboxes:
  • messages
  • message_deliveries
  • messaging_pre_checkouts
  • messaging_customer_information
  • message_reads
  • message_echoes
  1. Finally, click Confirm.

Your application is now configured to work with 3CX and you can try to send a message to your Facebook page. At this stage your app is in ‘Development’ mode, meaning you can only interact with users that have permission to manage your page. To switch to ‘Live’ mode, you need to request additional permissions and perform an application review - detailed below.

Step 4: Application Review

  1. In your Meta for Developers portal go to App Settings > Basic. Scroll down to the bottom of the page and click on + Add platform.
  2. Select Website and click Next.
  3. Enter the URL of your 3CX Web Client (E.g. https://exampledomain.com/webclient/) and click Save changes.

  1. Navigate to App Review > Permissions and Features.
  2. Search for ‘pages_messaging’ and click Request advanced access.

Note: At this stage, you may need to wait up to 24 hours after you have sent or received your test messages in Development mode for the button to become available.

  1. Now search for ‘Business Asset User Profile Access’ and again click on Request advanced access. Click on the button that has now changed to Edit App review request.

Note: To proceed further, submit business verification.

  1.  Click the blue arrow to complete the Data handling questions” form and then submit. (This section will appear after “business verification” is submitted).
  2.  Click the blue arrow to complete the “App Settings” form by adding an image for your App icon, provide a privacy policy URL and use the drop-down box to choose your app category as ‘Messaging’. Click “Save”.  (This section will appear after “Data handling questions” is submitted).
  3.  Click the blue arrow to complete the “Reviewer instructions” section by editing the below text with the credentials of your temporary test user created at the end of step 2 and pasting them in the first required field (the rest can be left empty).

Step 1. Log in to the 3CX WebClient with the following credentials:

  • PBX Web client URL: https://exampledomain:5001/webclient
  • Extension: ________
  • Password: ________

Step 2. Write and send a test message on the Facebook Page.

Step 3. Receive and reply to the message in your 3CX Web Client.

  1. Next, click the blue arrow in the next section entitled ‘How will this app use pages_messaging?’.
  2. Copy and paste the following text into the first ‘detailed description’ box.

This Facebook App is used to integrate 3CX Phone System (https://3cx.com) with Facebook Messenger chats. Each 3CX customer has their own 3CX instance and therefore will need to create their own App to integrate a Facebook Page. “pages_messaging” is required to receive and send messages started by a Facebook Page visitor.

  1. Under Test and reproduce the functionality of your integration’, use the drop-down box to select your Facebook Page. Now edit the below text with the credentials of your temporary test user created at the end of step 2.

Step 1. Log in to the 3CX WebClient with the following credentials:

  • PBX Web client URL: https://exampledomain:5001/webclient
  • Extension: ________
  • Password: ________

Step 2. Write and send a test message on the Facebook Page.

Step 3. Receive and reply to the message in your 3CX Web Client.

  1. Now you must record a screencast showing a message being sent to your Facebook Page, received by the Web Client, and replied to from the Web Client. There are many free screen recording options available including Loom and Screenrec.
  2. Once recorded, click Upload file and select your screencast.
  3. Check the confirmation box and click Save.
  4. Now click the blue arrow in the section entitled ‘How will this app use the Business asset user profile access?’.
  5. Copy and paste the following text into the detailed description box.

This Facebook App is used to integrate 3CX Phone System (https://3cx.com) with Facebook Messenger chats. Each 3CX customer has their own 3CX instance and will create their own App to integrate their Facebook Page. 3CX needs “Business Asset User Profile Access” because it exposes the user's name and picture for identification of chat users by agents. 3CX is using the name and picture attributes.

  1. Upload the same screencast that you previously recorded, tick the confirmation box and click Save.


  1. Click Submit for Review, enter your Facebook password for verification purposes and you will see a successful submission of your confirmation message.

  1. Finally, use the toggle button at the top of the screen to change your ‘App Mode’ from ‘Development’ to ‘Live’.

When your application is approved, you will receive messages from Facebook users. You should ensure you delete your temporary test user that was created for the app verification process and update your messaging routing to your desired destination.

See Also

Last Updated

This document was last updated on 24 June 2025

https://www.3cx.com/docs/manual/facebook/