Official Documentation Hub

Taqfu AI Documentation Hub

Complete A-to-Z guides for Google Gemini API connection, AI training, Website Live Chat, Comment Moderation, and all social integrations.

🟣

Instagram DMs & Comments

Meta Instagram Graph API

Complete 10-step setup via Desktop Browser or Mobile: Professional Account, Message Controls, Facebook Page Linking, Meta App Webhooks, Graph Permissions & 1-Click Auto-Detect

Meta for Developers Portal:https://developers.facebook.com/apps
Open Portal
Required Legal URLs & App Domain (Meta App Settings)

Copy and paste these required legal URLs into Meta App > App settings → Basic:

App Domaintaqfu.com
Privacy Policy URLhttps://taqfu.com/privacy-policy
Terms of Service URLhttps://taqfu.com/terms-of-service
Data Deletion Instructions URLhttps://taqfu.com/data-deletion

What Is Everything? (Meta App, Facebook Page, IG Professional & Why They Connect)

Core Concepts

Unlike WhatsApp or Telegram, Instagram automation inside Meta Graph API v21.0 requires a three-way bridge: (1) an Instagram Professional Account (Business or Creator), (2) a Facebook Page linked to that Instagram account, and (3) a Published Business Meta App with two messaging Use Cases.

  • Instagram Professional Account vs Personal: Only Business/Creator accounts expose a numeric 17-digit Instagram Business Account ID (1784...) and support webhook events for DMs & Comments.
  • Why Page-Linked EAA... Token (Not IGAA/IGQ): Meta issues EAA... Page Access Tokens tied to your linked Facebook Page, which reliably unlock Graph API v21.0 endpoints for Instagram DMs (POST /me/messages), Public Comment Replies (POST /{comment_id}/replies), Abuse Auto-Delete (DELETE /{comment_id}), and 1-Time Comment Private Replies (POST /{page_id}/messages with recipient.comment_id). Legacy IGAA/IGQ tokens fail these unified endpoints and are intentionally blocked.
  • Webhook Callback URL vs OAuth Redirect URL: Webhooks (/api/webhook/instagram) are server-to-server push notifications from Meta when customers message or comment. OAuth Redirect URL (/api/channels/instagram/callback) is only where the browser redirects after Meta Login consent (Configuration ID). Keeping them strictly in their respective boxes prevents "URI mismatch" errors.

Complete Meta App Architecture & Real Setup Blueprint (Both Use Cases)

End-to-End History & Workflow

Inside Meta Developer Portal (developers.facebook.com/apps), Meta splits Instagram capabilities across two separate Use Case panels. Configuring BOTH prevents the most common silent failures:

  • Use Case 1 — "Manage messaging & content on Instagram": Houses Unified Login Configuration (Step 1: OAuth Redirect URL /api/channels/instagram/callback), Instagram Asset Linking (Step 2: "Add account"), and Direct App-Level Instagram Webhooks (Step 3: /api/webhook/instagram subscribed to messages, messaging_postbacks, messaging_seen, comments, live_comments).
  • Use Case 2 — "Engage with customers on Messenger from Meta > Instagram settings": Houses Page-to-Instagram Access Permissions ("Add or remove Pages" so it does not show "No page permissions granted") and Messenger-bridged Instagram Webhooks (subscribed to messages, messaging_postbacks, messaging_seen, comments, live_comments, and standby).
  • Desktop-Browser-Only Workflow (No Phone Needed): Every required Instagram privacy/type toggle ("Switch to professional account", "Allow access to messages" at instagram.com/accounts/manage_message_delivery/, and Facebook Page linking at facebook.com/settings/?tab=linked_instagram) works cleanly in a desktop Chrome browser.
1

Switch Instagram Account to Professional (Business) — Browser or Mobile

Personal Instagram accounts cannot use automation APIs. You can switch directly from your desktop/laptop browser (no phone required) or mobile app:

  • 1.1 (Desktop Browser — No Phone Needed): Log into instagram.com → click More (☰) → Settings → open "Account type and tools" (instagram.com/accounts/professional_account_settings/) → click "Switch to professional account".
  • 1.2 (Mobile App Alternative): Open Instagram app → Profile → Menu (☰) → Settings and privacy → For professionals → Account type and tools → Switch to Professional Account.
  • 1.3 Select Business (recommended for stores/brands) or Creator, pick your category, and finish.
https://www.instagram.com/accounts/professional_account_settings/
2

Turn ON "Allow Access to Messages" (Connected Tools Toggle)

This critical Meta privacy toggle allows external servers (Taqfu AI) to receive incoming Instagram DMs via webhook. Works on Desktop Browser too:

  • 2.1 (Desktop Browser): Open https://www.instagram.com/accounts/manage_message_delivery/ directly (or Instagram Settings → Messages and story replies → Message controls).
  • 2.2 (Mobile App): Settings and privacy → Messages and story replies → Message controls.
  • 2.3 Scroll to the "Connected tools" section and toggle ON "Allow access to messages".
  • 2.4 Warning: Even with valid tokens and webhooks, if this toggle is OFF, Meta silently drops every incoming customer DM!
https://www.instagram.com/accounts/manage_message_delivery/
3

Link Your Instagram Professional Account to Your Facebook Page

Taqfu uses a unified Facebook Page Access Token (EAA...) to power both Messenger and Instagram DMs + Comments. Link them from Facebook Page Settings:

  • 3.1 Switch your Facebook session into your Brand/Store Page profile (e.g., TAQFU).
  • 3.2 Open Page Linked Instagram Settings directly at https://www.facebook.com/settings/?tab=linked_instagram (or Page Settings → Linked Accounts → Instagram).
  • 3.3 Click the blue "Connect account" button, confirm, and sign into your Instagram Professional account.
  • 3.4 Verify the status changes from "No Instagram connected" to Connected showing your @username and numeric ID.
https://www.facebook.com/settings/?tab=linked_instagram
4

Prepare Your Business Meta App (Use Cases, Legal URLs & Live Mode)

Open developers.facebook.com/apps → select your Business App (or create a Business-type Meta App):

  • 4.1 Under Use cases (or Add products), ensure you have BOTH: "Manage messaging & content on Instagram" AND "Engage with customers on Messenger from Meta" (plus "Manage everything on your Page").
  • 4.2 Open App settings → Basic: verify App domains includes taqfu.com (or your custom domain), plus Privacy Policy URL, Terms of Service URL, and Data Deletion URL.
  • 4.3 Verify your app status is Published / Live (never click "Unpublish").
5

Configure OAuth Redirect URL (Unified Login Configuration)

In "Manage messaging & content on Instagram" → Customize → Step 1 ("Configure your app" / Facebook Login for Business Configuration):

  • 5.1 Create or select your Instagram API (Unified Login) configuration.
  • 5.2 In "Register a new redirect URL", paste ONLY your OAuth Callback URL (ending in /api/channels/instagram/callback) and click Save.
  • 5.3 Select that /api/channels/instagram/callback URL in the dropdown list.
  • 5.4 CRITICAL: Never put the Webhook URL (/api/webhook/instagram) in the OAuth Redirect URL field — OAuth Redirects handle login consent, while Webhooks receive messages and comments!
https://taqfu.com/api/channels/instagram/callback
6

Authorize Your Instagram Account & Facebook Page Inside Meta App

Meta requires asset authorization in BOTH places inside App Dashboard before generating tokens or firing webhooks:

  • 6.1 Place A — In "Manage messaging & content on Instagram" → Step 2 ("Generate access tokens"): click "Add account" and log into your Instagram Professional account.
  • 6.2 Place B — Go to Use cases → "Engage with customers on Messenger from Meta" → Customize → "Instagram settings" → Access tokens: if it says "No page permissions granted", click "Add or remove Pages", select your Facebook Page, and confirm permissions.
7

Configure Webhooks in BOTH Meta App Sections (DMs + Post Comments)

Copy your Callback URL (/api/webhook/instagram) and unmasked Verify Token from Taqfu Dashboard → Channels & AI → Instagram Direct (DM):

  • 7.1 Go to "Manage messaging & content on Instagram" → Step 3 ("Configure webhooks"): enter Callback URL + Verify Token → click Verify and save.
  • 7.2 Subscribe to ALL 5 webhook fields: messages, messaging_postbacks, messaging_seen, comments, and live_comments.
  • 7.3 Also go to "Engage with customers on Messenger from Meta" → Customize → "Instagram settings" → Webhooks: set Callback URL + Verify Token → click Edit Instagram Webhook Subscriptions → check messages, messaging_postbacks, messaging_seen, comments, live_comments, and standby → Save.
https://taqfu.com/api/webhook/instagram
8

Generate Page Access Token via Graph API Explorer (With All Scopes)

Open developers.facebook.com/tools/explorer/ and select your Meta App on the right sidebar:

  • 8.1 Add ALL 9 required permissions under Permissions: instagram_basic, instagram_manage_messages, instagram_manage_comments, pages_show_list, pages_messaging, pages_read_engagement, pages_manage_engagement, pages_manage_metadata, and business_management.
  • 8.2 Click "Generate Access Token" → approve your Facebook Page AND your linked Instagram Professional account in the popup.
  • 8.3 In the "User or Page" dropdown, switch to your Facebook Page (e.g., TAQFU) so you get a true Page Access Token starting with EAA... (NEVER use IGAA/IGQ tokens).
  • 8.4 Optional Verification: Run the Graph query below to confirm instagram_business_account.id returns your 17-digit IG ID!
me?fields=id,name,instagram_business_account{id,username},connected_instagram_account{id,username}
9

Connect in 1 Click Inside Taqfu Dashboard (Auto-Detect or OAuth)

Open Taqfu Dashboard → Channels & AI → update your Facebook Page Token first (if regenerated), then open Instagram Direct (DM):

  • 9.1 Auto-Detect Method (Easiest): Leave Instagram Business Account ID blank and click "⚡ Auto-Detect & Connect via Linked Facebook Page" — Taqfu queries your linked Page via Graph API, saves your IG Business ID & @username, and subscribes Page DM webhooks automatically.
  • 9.2 Manual Token Method: Paste your Page Access Token (EAA...) directly into the Instagram modal (optionally add App Secret) and click "Verify & Connect".
  • 9.3 OAuth Button (Optional Platform Setup): If META_APP_ID, META_APP_SECRET & META_IG_CONFIG_ID are configured on server .env, click "🟣 1-Click Connect via Meta OAuth".
10

Verify Live DMs, Post Comments, 1-Time Private DM & Moderation

Test end-to-end using a non-brand personal account (or App Role Tester while in Standard Access):

  • 10.1 DM Auto-Reply: Send a DM ("Price please?") to your Instagram account → AI replies with catalog/knowledge details.
  • 10.2 Comment Auto-Reply + Private DM: Comment on an Instagram Post/Reel with a product question → Taqfu replies publicly under the comment AND sends a 1-time Private Reply DM into their Instagram Inbox.
  • 10.3 Abuse & Threat Moderation: Turn ON "Abuse & Threat Guard" in Channels & AI to auto-delete severe abuse/threats on Instagram comments (or reply cleanly with your funny/rhyming rule).
  • 10.4 View Everything in Unified Inbox: Check Inbox & DMs (🟣 Instagram) and Post Comments (💜 Instagram) inside Dashboard → Inbox or ?tab=comments.

⚡ Webhook Callback & Verify Token Info

https://taqfu.com/api/webhook/instagram
https://taqfu.com/api/channels/instagram/callback

🔒 For security, your unique store Verify Token is stored privately inside your account. Open Dashboard > Channels & AI > Manage to copy your store Verify Token.

Important Notes:

• EAA Page Token vs IGAA/IGQ Token: Taqfu rejects IGAA/IGQ user tokens because Graph API v21.0 DMs, comment replies, and 1-time Comment Private Replies run reliably through Facebook Page Access Tokens (EAA...) linked to your Instagram Business ID.

• Connected Tools Toggle Is Mandatory: Make sure "Allow access to messages" is ON at https://www.instagram.com/accounts/manage_message_delivery/ even if managing strictly from Desktop Browser.

• Never Confuse Callback URLs: Webhooks receive events at /api/webhook/instagram, whereas Meta Login Redirect URL uses /api/channels/instagram/callback.

• Two Places for Permissions in Meta App: Grant Page permissions in BOTH Messenger > Instagram settings ("Add or remove Pages") AND Manage messaging & content on Instagram > Step 2 ("Add account").

Frequently Asked Questions (FAQ)

Why does Auto-Detect say "এই Facebook Page-এ কোনো Instagram Professional অ্যাকাউন্ট পাওয়া যায়নি"?

This happens when either (1) facebook.com/settings/?tab=linked_instagram still shows "No Instagram connected" for your Page, or (2) your saved Page Access Token was generated without the 3 Instagram permissions (instagram_basic, instagram_manage_messages, instagram_manage_comments). Link the Page to your Business IG account and regenerate the Page Token via Graph API Explorer with all 9 permissions.

Why does Meta App Messenger > Instagram settings say "No page permissions granted"?

Even if your Facebook Page is already connected for Messenger, you must explicitly authorize it inside Messenger from Meta > Instagram settings > click "Add or remove Pages" and grant permission for your Page.

Why did Taqfu reject my token starting with IGAA... or IGQ...?

Tokens starting with IGAA or IGQ are Instagram-only user tokens that lack access to Meta Graph v21.0 Facebook Page-linked messaging and comment-to-DM Private Reply endpoints. Switch "User or Page" in Graph API Explorer to your Facebook Page to copy an EAA... Page Access Token.

Do I need a mobile phone to enable "Allow access to messages" or switch to Professional?

No! On desktop browser, open instagram.com/accounts/professional_account_settings/ to switch to Business, and open instagram.com/accounts/manage_message_delivery/ to toggle ON "Allow access to messages" under Connected tools.

What is the difference between /api/webhook/instagram and /api/channels/instagram/callback?

Put /api/webhook/instagram ONLY in the Webhook Callback URL fields (Step 3 of Manage messaging & content on Instagram, and Messenger > Instagram settings > Webhooks). Put /api/channels/instagram/callback ONLY in OAuth Redirect URL fields (Step 1 Login for Business Configuration).

Still Need Help?

Reach out to our support team or verify live connections directly from your dashboard.

Contact Support Team →
Instagram DMs & Comments | Taqfu AI Documentation