> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heylua.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Instagram

> Connect an Instagram professional account with Instagram Login so direct messages reach your agent and it can follow up

After this guide, direct messages to your Instagram account reach your agent and its replies appear in the DM thread. Instagram is connected in the admin dashboard only, with Instagram Login; `lua channels` has no Instagram entry. You need an Instagram professional account (Business or Creator), and no Facebook Page link is required.

*Verified against lua-cli 3.33.0.*

**Before you begin**

* An Instagram professional account. Meta's [Instagram Platform documentation](https://developers.facebook.com/docs/instagram-platform) covers converting a personal account.
* Message access allowed for connected tools in the Instagram app (**Settings → Messages and story replies → Connected tools**); without it Meta delivers no DMs to any app.
* An agent with a promoted production version; see [Release an agent](https://docs.heylua.ai/ship/releasing.md).

**1. Dashboard: link the account**

In the [admin dashboard](https://docs.heylua.ai/get-started/for-operators.md) open **Agents**, select the agent, select **+** in the **Channels** section of its **Overview** tab, and choose **Instagram** in **Connect a channel**. Tick **I accept the Terms of Service and Privacy Policy** and select **Connect**. Instagram Login opens and asks for `instagram_business_basic` and `instagram_business_manage_messages`; sign in with the professional account and grant them. Lua exchanges the code for a long-lived token and subscribes the account to the `messages` and `messaging_postbacks` fields.

**2. Verify**

From another Instagram account, send the professional account a DM with `hello`. The agent replies in the thread, and `lua channels list` shows an `INSTAGRAM` entry with the username.

```bash theme={null}
lua channels list
```

## Channel behavior

| Capability | Supported |
| - | - |
| Inbound direct messages and attachments | Yes |
| Inbound events that are dropped | Message echoes, deletions, reactions, read and delivery receipts, story mentions |
| `list-item`, `payment` | Rendered as Instagram templates; a `list-item` selection comes back as a message naming the item |
| `actions` | Quick replies |
| `images`, `reaction` | Rendered |
| `links`, `documents` | Not rendered; see the [rendering matrix](https://docs.heylua.ai/channels/formatting/overview.md) |
| Proactive sends | `Channels.send({ channel: 'instagram', to: { userId } })` to an end user who has already written to the agent; `user.send()` reaches an end user whose most recent conversation is on Instagram |

### Token lifecycle

Instagram tokens expire. Lua refreshes the long-lived token on a schedule and treats it as expiring a day early, so a healthy channel never needs attention. If Meta rejects a refresh (revoked permissions, a password change), Lua stops refreshing and marks the channel as needing reauthorisation; reconnect it from the admin dashboard and the schedule resumes.

## Limits

* Proactive sends are warm-only. There is no way to message someone who has never written to the account.
* An Instagram account connects to one agent at a time. Connecting it to a second agent fails with `This Instagram account is already connected to another agent. Disconnect it there before connecting it to this agent.`
* Admin dashboard only. The CLI lists the channel but cannot create or remove it.

## Troubleshooting

> [accordion] The Instagram Login popup fails or closes without connecting
>
> The account must be a professional account, and the browser must allow the popup. Convert the account, allow popups for the admin dashboard, and select **Connect** again.

> [accordion] DMs never reach the agent
>
> Check that message access for connected tools is allowed in the Instagram app and that the channel isn't marked as needing reauthorisation in the admin dashboard. Reactions, story mentions, and receipts are dropped by design; send a text message to test.

> [accordion] The channel needs reauthorisation
>
> Meta rejected the stored token, so refreshes are disabled. Disconnect the channel in the admin dashboard and connect it again with Instagram Login.

## Next steps

> [card] [Connect Facebook Messenger](https://docs.heylua.ai/channels/messenger.md)
>
> The Page-based sibling, with a CLI path.

> [card] [Send proactive messages](https://docs.heylua.ai/build/send-proactive-messages.md)
>
> What warm-only means for follow-ups.

> [card] [Channels reference](https://docs.heylua.ai/reference/sdk/channels.md)
>
> `Channels.send` and delivery status.

> [card] [About channels](https://docs.heylua.ai/concepts/channels.md)
>
> The inbound and outbound channel vocabularies.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.