A Meta developer app that will serve as the primary platform for managing connection between Messenger and Botpress, including the configuration of webhooks and access tokens.
A Facebook page that you own or has the developer role, this is needed to use the Messenger API.
If you do not already have a Facebook page you will need to create one. You can find details on how to create a new Facebook page here. To link your chatbot to a pre-existing page, you must have an administrator or developer role.
Botpress can only interact with the version 15.0 or higher of the Messenger API. It is not the default version in the app settings so it must be changed.
Go to your Meta app start page
In the left sidebar, expand the Settings menu and select Advanced
In the Upgrade API version section, select v15.0 or higher as the API version
The verify token is used by Facebook to verify that you are the real owner of the provided webhookYou can generate any random alphanumerical string for this configuration. Paste it in your Verify Token channel configuration
Channel configuration is completed, you can now click Save. It is important to save your configuration in Botpress before updating the webhook in the Meta app settings, otherwise Meta will be unable to validate the webhook URL.
To receive messages from Messenger in your Botpress bot, you will need to setup a webhook.
Go to your Meta app.
In the left sidebar, expand the Messenger menu and select Messenger API Settings
In the Webhooks section, click Add Callback URL
Copy paste the Webhook URL provided in the integration configuration page in Botpress.
Copy and paste the Verify Token that you generated earlier in the integration configuration page in Botpress.
Click on Verify and save. Make sure your channel configuration was saved before doing this step, otherwise the webhook validation will fail
Click on Add Subscriptions, then select messages and messaging_postbacks. Then click Save.
You may now start chatting with your bot on Messenger!
NoteIf the bot does not answer to some people, that’s probably because your app has not been reviewed by Meta yet (see this section). But don’t worry, this is not mandatory to test your bot.
When your app is in Development Mode, your bot will work for admins, developers, and testers of the app only. After your app is approved and made public, it will work for the general public.Read more about the App Review process on the official documentation and find some help if necessary in this Github issue.You can find some troubleshooting in this documentation in case you app get rejected.
You can create a customized greeting from your Page that will appear in Facebook messages and in the Messenger app when someone begins a conversation with your Page for the first time. Your Page’s greeting will appear before any messages are sent.Read more about the Messenger Greeting/Welcome Message