---
title: Facebook Messenger
slug: facebook-messenger
image: https://make-cxp-documentation.ams3.digitaloceanspaces.com/apps-center-icons/PREVIEW_facebook-messenger.png
createdAt: 2025-02-03T13:28:28.552Z
---

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/1xMP48SkIdun4FVa4X6-u-20251119-110222.png" size="50" width="800" height="800" position="center" showCaption="false"}
:::

:::VerticalSplitItem
With Facebook Messenger apps in Make, you can watch and send messages, send an action, upload an attachment, or get a sender in your Facebook Messenger account.
:::
::::

To use the Facebook Messenger modules, you must have a Facebook Developer account. You can create an account at [https://developers.facebook.com/](https://developers.facebook.com/).

Refer to the [Facebook API documentation](https://developers.facebook.com/docs/graph-api) for a list of available endpoints.

## Connect Facebook Messenger to Make

To establish the connection with a **Trigger module**, you must create a **webhook** with a **Verify Token** and add this information into your app in the Facebook Developer Portal.

To establish the connection with an **Action module**, you must generate an **Access Token** in your app in the Facebook Developer Portal.

The following example, [How to create a bot and connect it to Facebook Messenger and Make](https://apps.make.com/facebook-messenger#how-to-create-a-bot-and-connect-it-to-facebook-mes), describes both processes in a possible scenario.

## How to create a bot and connect it to Facebook Messenger and Make

The Facebook Messenger app supports a bot's connection that can then be used to receive and send messages on behalf of a designated page that belongs to the bot.

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/wxAFXzkLNq0Ly2VpCGOJa_uuid-de81154c-c844-35b7-2441-0a286c057c04.png)

1. Log in to the [Facebook developer portal](https://developers.facebook.com/apps) and click **Create App** in the upper right corner.
2. Choose **Other** as the use case for your app and click **Next**.
3. Add your **App name** and **Contact email**, then click **Create app**.
4. Once you create the app, you will be shown the Product Setup page. Select **Messenger** and click **Set up**.
5. Scroll down until you see the **Configure webhooks** section and click **Configure**. Click the **Add Callback URL** button. You will be prompted to fill in the **Edit Callback URL** and **Verify Token** fields. The required values can be generated through **Make**.
6. Open a new tab and log into your Make account, and create a new scenario.
7. Add the module **Facebook messenger > Watch messages** as the first module to your scenario. Click **Create a webhook**.
8. Enter a **Webhook name** and a **Verify Token** of your choice into the respective fields. You will need this **Verify Token** value later. Click the **Save** button.

   ![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/QNR9aoBIlIeFq8ef4g3VJ_uuid-7de5f739-218e-3f9b-a316-fe874cf180d2.gif)
9. Clicking the save button will generate a URL for your webhook. Copy this URL to your clipboard.
10. Go back to the **Edit Callback URL** dialog in your Facebook Developer account. In the **Callback URL** field, enter the URL from your clipboard, and in the **Verify token** field, enter the same token that you entered in step 6. Click **Verify and Save&#x20;**&#x74;o save the dialog.

    ![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/ykTr8rTCM3ZzebsMv93Zs_uuid-33ea8450-ab01-eb4c-fa1e-db677529def5.png)
11. Under **Generate Access Tokens**, click **Connect**. In the dialog box that opens, choose the pages you want your app to access and click **Continue** and **Save**.
12. Click **Got it**. You will return to the **Generate access tokens** section.
13. For your chosen page, click **Generate**.

    ![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/dZF1garZFZK7QMTWYMNxB_uuid-aec7fa85-b4d0-3b16-068a-9cc9207e007b.png)
14. In the **Token Generated** dialog box, confirm that you understand and then copy the token to your clipboard.

    ::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/WxwQDyrL0-SbCQRa7ILUe_uuid-83babb43-52d9-d167-26a1-6695e0a02b34.png" size="82" width="715" height="428" position="center" showCaption="false"}
15. To create a connection between Make and Facebook messenger, add a **Send a Message** module and click **Create a connection**. Enter the access token from the previous step into the **Access Token** field and click **Save**.
16. Map the `Sender ID` to the **Page Scoped User ID** field and specify the **Message Text** in the **Send a Message** module.
17. Set up the **Send a Message** module and run the scenario to test your bot.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/-WlViLyOCTpe4-U9S6MCT_uuid-46f36ea8-0554-a0a3-341d-fb646aee99d1.png" size="72" width="691" height="328" position="center" showCaption="false"}

## Testing the Facebook Messenger Bot

To test the bot application, you need to:

1. [Set up a test developer role](https://apps.make.com/facebook-messenger#set-up-a-test-developer-role).
2. [Run the scenario.](https://apps.make.com/facebook-messenger#run-the)
3. [Send a test message to the test page](https://apps.make.com/facebook-messenger#send-a-test-message-to-the-test-page) (created by the app administrator) when logged in as a test developer to trigger the **Watch messages** module in your scenario.

### Set up a test developer role

To test your application before publishing it, you need to set up roles for developers who will test it. **For non-developer accounts, the app does not respond until it is officially released.**

You need two Facebook accounts to test the app:

- The first account that creates the app (bot) is the Facebook page owner.
- The second account that is set up as a verified Facebook developer account ([How do I verify my developer account on Facebook?](https://www.facebook.com/help/167551763306531)) and sends the test message to the Facebook page.

Log in with your second developer (test) account and **confirm** the request on the [https://developers.facebook.com/requests](https://developers.facebook.com/requests) page.

### Run the scenario

After the test developer account is set, run your Make scenario, log in to Facebook (with your test developer account credentials), and open the public page you want to test the bot with.

### Send a test message to the test page

Send the message to the page to test your bot.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/v_cKJzH1TpaCbBD0Lre1G_uuid-a06e89ca-47fb-35c5-78ad-87fe2ba2ec75.png" size="60" width="290" height="30" position="center" showCaption="false"}

Conditions that have to be met while testing:

- The Facebook account you write a message to the Facebook page must be set as the developer of the app.
- The bot cannot send the message first (anti-spam policy). The app test user must initiate the conversation with the developer role, your second account.

For more information on how to set up the roles, see the [official Facebook documentation](https://developers.facebook.com/docs/apps/test-apps).
