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

# Instagram

> Connect Instagram Direct Messages to PingBack for unified social support.

Connecting your Instagram Business account routes Direct Messages into your PingBack inbox. Agents can reply from PingBack and the reply is delivered back to the customer via Instagram.

<Note>Instagram is available on the **Mini** and **Pro** plans only.</Note>

## Prerequisites

Before you start, make sure you have:

* An **Instagram Business Account** linked to a **Facebook Page**.
* A **Meta App** in the [Meta Developer Portal](https://developers.facebook.com/) with the **Instagram Messaging** permission (`instagram_manage_messages`) enabled.
* A valid **Page Access Token** with the required permissions.
* Your **Instagram Business Account ID**.

## Setup

<Steps>
  <Step title="Create the Instagram channel in PingBack">
    Send a `POST` request to `/api/v1/channels/` with `type` set to `"instagram"` and your credentials in the `config` object.

    <CodeGroup>
      ```bash curl theme={null}
      curl -X POST https://api.pingback.live/api/v1/channels/ \
        -H "Authorization: Bearer <your_token>" \
        -H "Content-Type: application/json" \
        -d '{
          "type": "instagram",
          "config": {
            "access_token": "EAAxxxxxxxxxxxxxxx",
            "instagram_business_account_id": "9876543210"
          },
          "is_active": true
        }'
      ```

      ```json response theme={null}
      {
        "id": 31,
        "type": "instagram",
        "is_active": true,
        "config": {
          "access_token": "EAAxxxxxxxxxxxxxxx",
          "instagram_business_account_id": "9876543210",
          "_meta_setup_instructions": {
            "callback_url": "https://api.pingback.live/api/v1/webhooks/instagram",
            "verify_token": "pingback_verify"
          }
        }
      }
      ```
    </CodeGroup>

    The response includes a `_meta_setup_instructions` object with the values you need for the next step.
  </Step>

  <Step title="Configure the webhook in your Meta App">
    In your Meta App's **Webhooks** section, add a new subscription for the **Instagram** product and set:

    | Field            | Value                                                 |
    | ---------------- | ----------------------------------------------------- |
    | **Callback URL** | `https://api.pingback.live/api/v1/webhooks/instagram` |
    | **Verify token** | `pingback_verify`                                     |

    Subscribe to the **`messages`** field and click **Verify and Save**.

    <Warning>The callback URL and verify token must match exactly as shown above. Any difference will cause webhook verification to fail.</Warning>
  </Step>

  <Step title="Test the connection">
    Send a Direct Message to your Instagram Business account from another account. The message should appear as a new conversation in your PingBack inbox within seconds.
  </Step>
</Steps>
