> For the complete documentation index, see [llms.txt](https://aibotkit.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aibotkit.gitbook.io/documentation/channels-and-integrations/instagram.md).

# Instagram

Let your AI chatbot reply to Instagram DMs sent to your business profile. When customers send you a direct message, your bot answers using your trained knowledge base. You can see all conversations in your AI Bot Kit dashboard.

## What you need

* An **Instagram Professional account** (Creator or Business)
* That Instagram account must be connected to a **Facebook Page**
* A paid plan on AI Bot Kit (Basic, Essential, or Business)

## How to set it up

### Step 1 — Create a Meta App

1. Go to [developers.facebook.com/apps](https://developers.facebook.com/apps) and log in with the same Facebook account that owns your Page.
2. Click **Create App**.
3. Choose **Other** → then **Business**.
4. Give your app a name (for example: "My AI Bot").
5. You will land on the app dashboard.

### Step 2 — Add Instagram to your app

1. On the app dashboard, click **Add Product**.
2. Find **Instagram** and click **Set Up**.
3. Then Click **Instagram API Setup with Instagram Login** in sidebar menu.
4. Follow the prompts to connect your **Instagram Professional account**.
5. Make sure your Instagram account shows as **Connected**.

### Step 3 — Generate your Access Token and copy your App Secret

1. On the left menu, click **Instagram → API Setup with Instagram Login**.
2. Click **Generate Token**.
3. Select the Instagram account you want to use.
4. Grant the permissions when asked.
5. A long token will appear — copy it. This is your **Page Access Token**.
6. **Also on this same page**, look for the **App Secret** field at top right and copy that too. You need both values.

### Step 4 — Make your app live

Before your bot can reply to real customers, you must switch your app from **Development** to **Live**.

1. Go to **Settings → Basic**.
2. Fill in:
   * **Privacy Policy URL** — a link to your website's privacy policy
   * **App Icon** — upload a square logo
   * **Category** — choose something like "Business and Pages"
   * **Contact Email**
3. At the top of the page, toggle the switch from **In Development** to **Live**.
4. Confirm when prompted.

> **Note:** If you do not add a Privacy Policy URL, Meta will not let you go live.

### Step 5 — Connect to AI Bot Kit

1. Open your AI Bot Kit dashboard.
2. Go to your chatbot → **Integrations** → **Instagram**.
3. Paste the following:
   * **Page Access Token** — the long token you generated
   * **App Secret** — copied from the same API Setup page
   * **Verify Token** — type any random word or phrase you choose (for example: `my-botkit-token`). You will use this again in the next step, so write it down.
4. Click **Connect Instagram**.

### Step 6 — Set up the webhook in Meta

After connecting, AI Bot Kit will show you a **Webhook URL**. Copy it.

1. Go back to your Meta app dashboard.
2. On the left menu, click **Instagram → API Setup with Instagram Login**.
3. Find Second Step Below Generate Token **Webhook Steup**.
4. Paste the **Webhook URL** into the **Callback URL** field.
5. Paste the same **Verify Token** you typed in AI Bot Kit.
6. Click **Verify and Save**.

### Step 7 — Test it

Send a direct message to your Instagram account from another account. Your bot should reply automatically.

You can see the conversation in your AI Bot Kit dashboard under the **Conversations** tab.

## Tips

* **Test with your own account first.** Before your app is fully reviewed by Meta, only accounts listed as testers in your Meta app can send DMs to the bot. Add yourself as a tester under **Roles → Testers** in the Meta app dashboard.
* **The Verify Token is just a password you make up.** It only needs to match between AI Bot Kit and the Meta webhook settings.
* **One Instagram account per chatbot.** If you want the same bot on a different Instagram account, create a new chatbot.
* **Keep your App Secret safe.** Do not share it. AI Bot Kit stores it securely and uses it to confirm messages are really coming from Instagram.

## Limits

* Every bot reply counts toward your **Monthly AI Messages** quota.
* Meta only allows replies within **24 hours** of the customer's last message. After that, the bot cannot send new messages until the customer messages again.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://aibotkit.gitbook.io/documentation/channels-and-integrations/instagram.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
