How to send message from Bot Press to Messager API
Preparation
- Bot Press server
Setup Bot Press
- Go to Code Editor
- Add
messaging
inCurrent Bot/bot.config.json
"messaging": {
"channels": {
"messenger": {
"enabled": true,
"accessToken": "your_access_token",
"appSecret": "your_app_secret",
"verifyToken": "your_verify_token"
}
}
}
your_access_token
fromGenerate access tokens
section (should added page before)your_app_secret
fromApp settings > Basic > App secret
your_verify_token
should same asConfigure webhooks
Create app
Go to Create an app — Meta for Developers (facebook.com)
Setup Messager
Connect FB page
Add subscription
- messages
- messaging_postbacks
Setup webhook
Callback URL: <EXTERNAL_URL>/api/v1/messaging/webhooks/<YOUR_BOT_ID>/messenger
EXTERNAL_URL
BotPress server urlYOUR_BOT_ID
fromBot Configuration > General > Bot Id
Verify Token: token same as Current Bot/bot.config.json