Buni.aiDocs
Chatbot

Messenger and Instagram

Connect a chatbot to Facebook Messenger and Instagram direct messages through your Meta app.

Messenger Instagram Messenger and Instagram direct messages both come through a Meta developer app, so their setup is almost the same. You can connect one or both to the same chatbot.

Before you start you need:

  • A Meta developer app. For Messenger, add the Messenger product; for Instagram, add Instagram messaging.
  • For Messenger, a Facebook Page you manage. For Instagram, an Instagram business account connected to that app.
  • A chatbot project in Buni.ai.

Set up the connection

Collect the values from Meta

From your app in the Meta for Developers dashboard, collect:

  • Messenger: a Page Access Token for your Page.
  • Instagram: an Access Token for the Instagram account.
  • The App Secret and App ID from App settings › Basic.

Choose a Verify Token: any string you make up. You will enter it in both Buni.ai and Meta.

Add the channels to the chatbot

Open the chatbot's trigger node and go to the Platforms tab. In Messaging Platforms, select Messenger, Instagram or both. Under Platform Configuration, fill in each one's fields.

Store tokens and secrets as credentials and pick them with the credential selector.

Publish and copy the webhook URL

Publish the project and copy Your Bot Webhook URL from the Platform Setup dialog, or later from Settings›General›Bot Webhook Configuration.

Configure Meta's webhook

In your Meta app's webhook settings for Messenger (and for Instagram, if you use it):

  • Set the Callback URL to your Bot Webhook URL.
  • Set the Verify token to the same Verify Token you entered in Buni.ai.
  • Subscribe to the message events.

For Messenger, also subscribe your Page to the app so its messages are delivered.

Test it

Send a message to your Page on Messenger, or a direct message to the Instagram account, from a personal account.

The Messenger section of the trigger node's Platforms tab with Page Access Token, App Secret, App ID, Verify Token and Webhook URL fields, using placeholder values
Messenger settings on the trigger node. Placeholder values shown.

Fields

Messenger

FieldRequiredWhat to enter
Page Access TokenYesThe token for your Facebook Page.
App SecretYesYour Meta app's secret, used to verify incoming webhooks.
App IDNoYour Meta app's id.
Verify TokenYesThe string you chose for webhook verification.
Webhook URLNoFilled in when the project is deployed.

Instagram

FieldRequiredWhat to enter
Access TokenYesThe token for the Instagram account.
App IDNoYour Meta app's id.
App SecretYesYour Meta app's secret, used to verify incoming webhooks.
Verify TokenYesThe string you chose for webhook verification.
Webhook URLNoFilled in when the project is deployed.

How requests are verified

Meta signs every webhook with an x-hub-signature-256 header. Buni.ai checks it against the App Secret for the channel and rejects anything that does not match with 403. If the App Secret is wrong, no messages get through even though Meta's verification step succeeded.

Troubleshooting

Last reviewed 24 September 2026

On this page