Messenger

Learn to set up a Facebook Messenger communication channel for your bot in NLX's Dialog Studio

If you don't already have a Facebook page for your bot to connect to, create one on Facebook (https://facebook.com). Once your page is in place, set up Messenger before creating a channel for your bot.

Step 1: Set up Messenger

To generate the other necessary properties to get your bot up and running with Messenger, first create a Messenger product:


Step 2: Generate Page access token

  • On your Facebook App's page, click Add or Remove Pages

  • Navigate to your app's page and choose the Facebook page you want to link your bot to

  • Follow the steps in the pop-up

  • After the page is added, click Generate Token

  • Copy the token from the popup > click Done


Step 3: Generate Verify token

You may use any method to generate this string. We recommend using a password generator such as https://www.lastpass.com/password-generator

For security, make sure the token is at least 32 characters long.


Step 4: Create Messenger channel

In Dialog Studio, create a Messenger channel for your bot under the Channels tab:

  • Expand Messenger option

  • Select + Create channel

  • Enter Verify token

  • Enter Page access token

  • Click Create channel

Before proceeding with Step 5, create a build and deploy your bot.


Step 6: Post deployment

  • After deploying your bot, make note of the bot's URL by expanding the Details link beside your Deplolyed status. Expand the Messenger section in the popup modal > copy the Bot URL

  • On your Facebook App's page, scroll to the Webhooks section > click Add Callback URL

  • Enter the bot's URL into the Callback URL field. Then enter the Verify token value you created into the Verify Token field

  • Click Verify and Save

  • On your Facebook App's page, scroll to the App Review for Messenger section > select to add the pages_messaging permission

Last updated