Facebook Messenger Setup

To create a bot for Facebook Messenger, you need to configure your Facebook App and Page so that Coldbrew Bots API can properly connect to Messenger Platform and send/receive messages for your app.

Step 1. Create Bot

Open API Bot, and, find "Create Bot" button in "Manage Bots" menu.

Enter the name of your bot, and, you will see your new bot in the "Manage Bots" menu. (Try swipe to the right if you don't see it.)

Step 2. Prepare Facebook App and Page

All Facebook Messenger bots require both Facebook App and Facebook Page. It's not a Coldbrew Bots requirement. Therefore, you will have to create a new Facebook App and Facebook Page for your bot, unless you already have them.

Step 3. Enter Page Access Token

After creating your app, you need to add "Messenger" product to your app, if you haven't yet.

Find the "Token Generation" sectionin "Messenger" product menu, and, select your Facebook Page to get the Page Access Token.

You need to set the Page Access Token for your bot using API Bot. Click "Page Access Token" button of the bot you created, and, enter the Page Access Token.

Step 4. Configure Webhooks

IMPORTANT: You must complete the Step 3 first. Otherwise your subscription request during this step will fail.

Now find the Webhooks section of "Messenger" product menu, and, click "Setup Webhooks" button.

(If this is your first time configuring webhooks, you will see "Callback URL" and "Verify Token" fields. Otherwise, you will have to go to "Webhooks" product menu to modify them.)

  • Callback URL: https://bots.coldbrewcloud.com/fm/webhook/{your bot ID}
  • Verify Token: {your bot verify token}
  • Subscription Fields: check "messages" and "messaging_postbacks" options

To view your bot's Webhook setup information, go back to API Bot again, then find "Bot Info" button in "Manage Bots" menu.

After entering those input fields, make sure to click "Verify and Save" button in the dialog.

Step 5. Configure Page Subscription

Now select the Facebook Page in the lower part of "Webhooks" section again, and, click "Subscribe" button.

Once subscribed successfully, it will look like this:


And, that's it. Now your bot is properly configured and connected to receive and send messages through Coldbrew Bots API. You can