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

# Instagram via Instagram Business Login

> Set up Instagram integration using Instagram Business Login authentication (recommended method)

<Note>
  Please ensure you have installed version v4.1 or above. If not, please refer to this [guide](./instagram-channel-setup) for the Facebook Login method.
</Note>

## Prerequisites

1. A valid facebook account.
2. A valid instagram professional account.

## Register A Facebook App

To use Instagram Channel, you have to create a Facebook app in the developer portal. You can find more details about creating Facebook apps [here](./facebook-channel-setup).

1. Click on the "Create App" button

<img src="https://mintcdn.com/chatwoot-447c5a93/qGPxFBLJOb0CiH-G/self-hosted/images/facebook/facebook-create-app.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=4afb1570f2e5f2f5a79661a5e83fd919" alt="facebook_create_app" width="2548" height="1474" data-path="self-hosted/images/facebook/facebook-create-app.png" />

2. Select the option "Other".

<img src="https://mintcdn.com/chatwoot-447c5a93/qGPxFBLJOb0CiH-G/self-hosted/images/facebook/facebook_other_app.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=5ebdaffa0d99578c4681798d9e81b0b7" alt="facebook_other_app" width="1654" height="1254" data-path="self-hosted/images/facebook/facebook_other_app.png" />

3. For the app type, choose "Business"

<img src="https://mintcdn.com/chatwoot-447c5a93/qGPxFBLJOb0CiH-G/self-hosted/images/facebook/facebook_business.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=14c2ac351761f69df0293a9181905039" alt="facebook_business" width="2164" height="1744" data-path="self-hosted/images/facebook/facebook_business.png" />

4. Add app name and connect business account

<img src="https://mintcdn.com/chatwoot-447c5a93/qGPxFBLJOb0CiH-G/self-hosted/images/facebook/facebook_business_details.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=3428088d33abdd74860fa9d974ac83ab" alt="facebook_business_details" width="2150" height="922" data-path="self-hosted/images/facebook/facebook_business_details.png" />

5. Add Instagram product from the Home page.

<img src="https://mintcdn.com/chatwoot-447c5a93/B9wOdsckmqTHx3J4/self-hosted/images/instagram/instagram_product.png?fit=max&auto=format&n=B9wOdsckmqTHx3J4&q=85&s=deeac2848f38a90f5e6ba08f95bf5098" alt="instagram_product" width="2984" height="1716" data-path="self-hosted/images/instagram/instagram_product.png" />

## Configure Instagram settings for Chatwoot

1. Copy Instagram app ID and Instagram app secret

<img src="https://mintcdn.com/chatwoot-447c5a93/B9wOdsckmqTHx3J4/self-hosted/images/instagram/instagram_app_id.png?fit=max&auto=format&n=B9wOdsckmqTHx3J4&q=85&s=e0f20952329ec11a2420f1da37c0df90" alt="instagram_app_id" width="2138" height="1874" data-path="self-hosted/images/instagram/instagram_app_id.png" />

2. Add the Instagram app ID and Instagram app secret to your app config via `{Chatwoot installation url}/super_admin/app_config?config=instagram`

<img src="https://mintcdn.com/chatwoot-447c5a93/B9wOdsckmqTHx3J4/self-hosted/images/instagram/instagram_app_config.png?fit=max&auto=format&n=B9wOdsckmqTHx3J4&q=85&s=56ec64ce5a258cd2a3045adc3d9fb9a2" alt="instagram_app_config" width="1844" height="1295" data-path="self-hosted/images/instagram/instagram_app_config.png" />

3. Configure Webhooks

Set the callback URL to `{your_chatwoot_url}/webhooks/instagram`. The verify token should match your `INSTAGRAM_VERIFY_TOKEN`, which can be configured through `app_config`

<img src="https://mintcdn.com/chatwoot-447c5a93/B9wOdsckmqTHx3J4/self-hosted/images/instagram/instagram_webhook.png?fit=max&auto=format&n=B9wOdsckmqTHx3J4&q=85&s=dc84aa92ea56a9f56ff02d2bd8506e98" alt="instagram_webhooks" width="1432" height="594" data-path="self-hosted/images/instagram/instagram_webhook.png" />

Subscribe to `messages`, `messaging_seen`, and `message_reactions` events.

<img src="https://mintcdn.com/chatwoot-447c5a93/B9wOdsckmqTHx3J4/self-hosted/images/instagram/instagram_webhooks_subscribe.png?fit=max&auto=format&n=B9wOdsckmqTHx3J4&q=85&s=0ee521f89062ae08adf9f7eb397e3ce8" alt="instagram_webhooks_subscribe" width="1420" height="1648" data-path="self-hosted/images/instagram/instagram_webhooks_subscribe.png" />

<Note>
  To receive web hooks, app mode should be set to "Live".
</Note>

4. Set up Instagram business login

Set Redirect URL as `{your_chatwoot_url}/instagram/callback`

<img src="https://mintcdn.com/chatwoot-447c5a93/B9wOdsckmqTHx3J4/self-hosted/images/instagram/instagram_business_login.png?fit=max&auto=format&n=B9wOdsckmqTHx3J4&q=85&s=de1004bf1aeb8c4a614e2dc04f21fcff" alt="instagram_business_login" width="1466" height="692" data-path="self-hosted/images/instagram/instagram_business_login.png" />

5. Create a new Instagram tester account

## Create Instagram Inbox

Head over to Chatwoot and create a Instagram inbox. Please refer to this [guide](https://chatwoot.help/hc/user-guide/articles/1744361165-how-to-setup-an-instagram-channel-via-instagram-login) for more details on creating a Instagram inbox in Chatwoot.

## How to test the Instagram before going to live

1. Add Instagram Testers by clicking "Add People" button.

<img src="https://mintcdn.com/chatwoot-447c5a93/qGPxFBLJOb0CiH-G/self-hosted/images/instagram/instagram-testers-list.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=d5d9bb1710c5e5d1c7b2e79f74e3a269" alt="facebook_instagram_test" width="3526" height="2526" data-path="self-hosted/images/instagram/instagram-testers-list.png" />

2. Make sure that you have selected the role Instagram Tester while creating a new tester.

<img src="https://mintcdn.com/chatwoot-447c5a93/qGPxFBLJOb0CiH-G/self-hosted/images/instagram/instagram-add-tester.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=7d09cd8176741834c6eb8d45d3345438" alt="instagram_tester_list" width="2946" height="1822" data-path="self-hosted/images/instagram/instagram-add-tester.png" />

## Going into production.

Before you can start using your Facebook app in production, you will have to get it verified by Facebook. Refer to the [docs](https://developers.facebook.com/docs/messenger-platform/instagram/app-review) on getting your app verified.

## Troubleshooting & Common Errors

### Insufficient Developer Role Error

Ensure the Instagram user is added as a developer: `Meta Dashboard → App Roles → Roles → Add People → Enter Instagram ID`

### API Access Deactivated

Ensure the **Privacy Policy URL** is valid and correctly set.

### Invalid request: Request parameters are invalid: Invalid redirect\_uri

Please configure the Frontend URL. The Frontend URL does not match the authorization URL.

### Instagram Channel creation Error: Failed to exchange token

Please make sure that tester account has been added to the facebook app settings.

### 400: Session Invalid when connecting the instagram channel

This might be issue from facebook side. Please try again after some time.
