How to connect a professional Instagram account through your own Meta app: the Instagram app ID and secret, an Instagram token, and the webhook in Meta's App Dashboard.
This is messaging in Instagram Direct. It connects through your own Meta app, the same way WhatsApp Business and Facebook do: the app and the account are yours, and Lalexi only receives and sends the messages.
You cannot write first: Meta lets you reply to people who wrote themselves, within 24 hours of their last message.
What to prepare
- A professional Instagram account — Business or Creator. Meta does not hand a personal account's messages to the API.
- An app in Meta for Developers (developers.facebook.com), type Business, with the Instagram product (API setup with Instagram login).
- The Instagram app ID and Instagram app secret — under Instagram → API setup with Instagram login. These are not the App ID and App Secret on App settings → Basic: an app with Instagram login carries two different pairs, and Meta signs this channel's webhooks with the Instagram one. Paste the other pair and the connection succeeds while not a single message ever arrives.
- On App settings → Basic, set the privacy policy URL and switch the app to Live mode: until then Meta sends no messages.
- An Instagram token: Instagram → API setup with Instagram login → Generate access tokens — add the account, sign in to Instagram and press Generate token.
A workspace administrator connects it — see Team.
How to connect
- Open Settings → Inboxes and press Add Inbox.
- Choose Instagram and fill in the form: a name (optional), the Instagram app ID, the Instagram app secret, the Instagram access token.
- Once the Instagram app ID is in, the form shows a Callback URL and a Verify
token. Set up the webhook in your app — Meta allows this step only in its
App Dashboard:
- Instagram → API setup with Instagram login → Configure webhooks.
- Paste the Callback URL and Verify token from the Lalexi form and press Verify and save.
- Subscribe to the
messages,messaging_seenandmessage_reactionsfields.
- Press Connect. Lalexi checks the app and the token and subscribes the account to your app.
- Add the inbox's agents.
The webhook can also be set up after connecting: the same values are always on the inbox's Meta app settings tab.
The token and its renewal
An Instagram token lives 60 days. Lalexi renews it on its own while it is still valid — nothing to do. If the token does stop working (it was revoked, or the account changed its password), the inbox settings show a warning: open the Meta app tab and paste a new token under Replace credentials. The inbox and its conversations stay.
If something goes wrong
| Message | What to do |
|---|---|
| Meta rejected the Instagram app secret | Take it from Instagram → API setup with Instagram login, not from App settings → Basic — they are different values. |
| Meta rejected the token | Generate the token again under API setup with Instagram login. |
| Only a professional account can receive messages | Switch the account to Business or Creator in Instagram's settings. |
| Already connected in another workspace | An account can live in one Lalexi workspace only. |
| Connected, but no messages arrive | Check the webhook (step 3), the Live mode, and that the fields hold the Instagram pair rather than the App ID from Basic. If only people with a role in the app get through, Meta requires App Review. |
How to connect a Facebook page (Messenger) through your own Meta app: the app ID and secret, a page token; verification and the webhook happen automatically.
Avito
How to connect Avito chats to Lalexi: a verified company profile, the right subscription level, and linking the account either by signing in with Avito or with API keys.