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

# Instagram

export const title_0 = "Instagram";

## Prerequisites

If you choose to create a custom OAuth application in the Meta Developer Portal (optional), follow these steps:

<Note>
  Before you begin, make sure your Instagram account is a Business or Creator account that is connected to a Facebook Page. You must have a role on the Page that is associated with the Instagram account.
</Note>

<Steps>
  <Step>
    Go to the [Meta Developer Portal](https://developers.facebook.com/apps). Sign in with your Facebook account (or create one if you do not already have one).
  </Step>

  <Step>
    Register the application.

    * Click **Create App** and follow the prompts to create a new app.
    * After the app is created, go to **Settings** > **Basic**. The **App ID** and **App Secret** shown here are the values you will enter as the **OAuth Client Id** and **OAuth Client Secret** in the setup steps below.
    * Click **Add Platform** and select **Website**. Enter a **Site URL** for your application.
  </Step>

  <Step>
    Add and configure the Facebook Login product.

    * From the left navigation, click **Add Product** and add **Facebook Login**.
    * Under **Facebook Login** > **Settings**, in **Valid OAuth Redirect URIs**, enter the redirect URI used by Connect AI: *[https://oauth.cdata.com/oauth/](https://oauth.cdata.com/oauth/)*.
    * Save your changes.
  </Step>

  <Step>
    Add the Instagram product.

    * From the left navigation, click **Add Product** and add **Instagram**.
  </Step>

  <Step>
    Submit your app for review.

    * Click **App Review** > **Permissions and Features**, then click **Request Advanced Access** for the following permissions: **instagram\_basic**, **instagram\_manage\_comments**, and **instagram\_manage\_insights**.
    * Provide the information Meta requires and submit the request. You must wait for Meta to approve the permissions before you can use the custom OAuth app to connect production Instagram accounts.
  </Step>
</Steps>

## Setup Guide

Follow these steps to connect Instagram to your Connect AI account:

<Steps>
  <Step>
    Open the **Sources** page of the Connect AI navigation menu.
  </Step>

  <Step>
    Click **+ Add Connection** in the upper-right corner.
  </Step>

  <Step>
    Type *Instagram* into the search field, then click the data source name.
  </Step>

  <Step>
    On the **Basic Settings** tab of the new connection, enter a connection name or keep the default name.
  </Step>

  <Step>
    (Optional) **Enter a Business Account Id**. This is only required if you have more than one Instagram business account associated with one Facebook Account.
  </Step>

  <Step>
    (Optional) If you are using a custom OAuth application to connect, click **Advanced Settings** and enter the **OAuth Client Id** and **OAuth Client Secret** obtained from the prerequisites.
  </Step>

  <Step>
    Click **Sign in** to connect securely through OAuth. This action opens the Instagram sign-in page in a new tab.
  </Step>

  <Step>
    Log in to your Instagram account and provide the requested permissions (if applicable).
  </Step>

  <Step>
    At the top of the Connect AI **Add {title_0} Connection** page, click **Save & Test**.

    * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
    * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
    * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
  </Step>
</Steps>

## More Information

For more information about interactions between Connect AI and Instagram, see [this information page](https://cdn.cdata.com/help/ENM/cloud/default.htm#default).
