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

# Instagram

> Add your bot to Instagram using the official integration.

{/* vale on */}

[Open in Hub](https://studio.botpress.cloud/home?exploreHub=1\&hubItemId=intver_01KRC18D2WGRKT0G2SRZQ5VE3Z)
*v4.1.9*

The official Instagram integration allows your users to chat with your bot by messaging an Instagram account.

## Setup

> [tab] Basic configuration
>
> > [!NOTE]
> >
> > You will need:
> >
> > * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> > * A [professional Instagram account](https://help.instagram.com/138925576505882?helpref=faq_content). If you have a personal Instagram account, the setup wizard will ask you to switch to a professional account.
>
> 1. In Botpress Studio, select **Explore Hub** in the upper-right corner.
> 2. Search for the **Instagram** integration, then select **Install Integration**.
> 3. In the **Configuration** menu, select **Authorize Instagram**.
> 4. Follow the instructions to connect Botpress to your Instagram account.

> [tab] Manual configuration
>
> You can also manually configure the Instagram integration with your own Meta app.
>
> > [!NOTE]
> >
> > You will need:
> >
> > * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> > * A [Meta developer app](https://developers.facebook.com/apps/creation/). Check out the [Meta developer documentation](https://developers.facebook.com/docs/instagram-platform) to learn more about the setup process.
> > * A [professional Instagram account](https://help.instagram.com/138925576505882?helpref=faq_content). If you have a personal Instagram account, the setup wizard will ask you to switch to a professional account.
>
> ### 1. Install the integration
>
> First, install the integration to your bot:
>
> 1. In Botpress Studio, select **Explore Hub** in the upper-right corner.
> 2. Search for the **Instagram** integration, then select **Install Integration**.
> 3. In the **Configuration** menu, open the drop-down menu and select **Manual Configuration**.
> 4. Copy the webhook URL—it should begin with `webhook.botpress.cloud`.
>
> ### 2. Add the Instagram API
>
> To configure your integration, you need to access the Instagram API:
>
> 1. Login to your [Meta developer account](https://developers.facebook.com/apps/).
> 2. Select the app you want to use with the integration.
> 3. From the left navigation bar, select **Add Product**.
> 4. Under the **Instagram** section, select **Set up**.
>
> ### 3. Configure Instagram Tester role
>
> Next, add an Instagram Tester role to your Meta App:
>
> 1. From the left navigation bar, select **App roles**, then **Roles**.
> 2. Select **Add People**, then **Instagram Tester**.
> 3. Enter your Instagram username, then select **Add**.
> 4. Login to your Instagram account, then open the [Apps and websites](https://www.instagram.com/accounts/manage_access/) settings.
> 5. Open the **Tester Invites** tab, then select **Accept**.
>
> ### 4. Configure the integration
>
> To configure the integration, you need to create a webhook endpoint for the WhatsApp integration. To do this, fill in the integration’s configuration fields:
>
> > [accordion] Client Secret
> >
> > 1. From your Meta app's left sidebar, expand **Instagram** and select **API setup with Instagram login**.
> >
> > > [!WARNING]
> > >
> > > Make sure you're in **API setup with Instagram login** and not **API setup with Facebook login**.
> >
> > 2. Copy the code under **Instagram app secret**.
> > 3. Go back to the integration's configuration menu in Botpress.
> > 4. Paste the code into the **Client Secret** field.
>
> > [accordion] Verify Token
> >
> > Used by Meta to verify that you’re the real owner of the provided webhook. Can be any alphanumeric string.
>
> > [accordion] Access Token
> >
> > 1. From your Meta app's left sidebar, expand **Instagram** and select **API setup with Instagram login**.
> >
> > > [!WARNING]
> > >
> > > Make sure you're in **API setup with Instagram login** and not **API setup with Facebook login**.
> >
> > 2. Expand **Generate access tokens**, then **Generate token**.
> > 3. Select **Allow**, then copy the access token.
> > 4. Go back to the integration's configuration menu in Botpress.
> > 5. Paste the access token into the **Access token** field.
>
> > [accordion] Instagram Account ID
> >
> > 1. From your Meta app's left sidebar, expand **Instagram** and select **API setup with Instagram login**.
> >
> > > [!WARNING]
> > >
> > > Make sure you're in **API setup with Instagram login** and not **API setup with Facebook login**.
> >
> > 2. Expand **Generate access tokens**. Then, copy the number under your Instagram account handle.
> > 3. Go back to the integration's configuration menu in Botpress.
> > 4. Paste the number into the **Instagram Account ID** field.
>
> When you’ve filled in all the fields, select **Save Configuration**. This will automatically enable your integration.
>
> ### 5. Set up the Instagram API
>
> Now, you can set up the Instagram API and add the webhook to your Meta app:
>
> 1. Go back to your Meta developer dashboard, then select **Instagram** from the left navigation bar.
>
> 2. Select **API setup with Instagram login**.
>
> 3. Under **Configure webhooks**, paste your Botpress webhook URL into the **Callback URL** field.
>
> 4. In the **Verify token** field, enter the same token you created in the [previous step](integrations/integration-guides/instagram#verify-token).
>
> 5. Select **Verify and save**.
>
> > [!NOTE]
> >
> > If you receive an error message after selecting **Verify and save**, make sure you saved your integration's configuration properly in the previous step.
>
> 6. Now,  select the required subscriptions for your webhook. Select **Add Subscriptions**, then select:
>    * `messages`
>    * `messaging_postbacks`
>    * `instagram_manage_messages` (if your app has been [reviewed by Meta](#submit-your-app-for-meta-review)
>
> 7. Select **Save**.
>
> > [!TIP]
> >
> > You’ve manually configured your Instagram integration!
>
> ### Submit your app for Meta review
>
> After setup is complete, you can submit your app for [review by Meta](https://botpress.com/docs/integrations/integration-guides/instagram.md#submit-your-app-for-meta-review), the parent company of WhatsApp. This verification confirms the identity and eligibility of your business to use Meta’s platforms.
>
> While the review is pending, 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 as well.

> [tab] Playground
>
> If you want to test your bot’s behaviour in Instagram before going through the actual setup process, you can use the Instagram integration playground.
>
> > [!NOTE]
> >
> > You will need:
> >
> > * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> > * A [professional Instagram account](https://help.instagram.com/138925576505882?helpref=faq_content). If you have a personal Instagram account, the setup wizard will ask you to switch to a professional account.
>
> 1. In Botpress Studio, select **Explore Hub** in the upper-right corner.
> 2. Search for the Instagram integration, then select **Install Integration**.
> 3. Select **Test your agent on Instagram**.
> 4. Follow the instructions to set up the playground.

***

## Cards

{/* vale off */}

Here's a reference for all [Cards](https://botpress.com/docs/studio/concepts/cards/introduction.md) available with the integration:

### Get or Create a Conversation

Proactively create a conversation from a bot

**input** `object`

**conversation** `object` *required*

The conversation object fields

**id** `string` *required*

The Instagram user ID of the user in the conversation

**commentId** `string`

The Instagram comment ID under which the direct message conversation was started

**output** `object`

**conversationId** `string` *required*

The Botpress ID of the created conversation

### Get or Create a User

Proactively create a user from a bot

**input** `object`

**name** `string`

The name of the user

**pictureUrl** `string`

The URL of the user profile picture

**email** `string`

The email of the user

**user** `object` *required*

The user object fields

**id** `string` *required*

The Instagram user ID

**output** `object`

**userId** `string` *required*

The Botpress ID of the created user


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