लॉग इनमुफ़्त ट्रायल शुरू करें
easyCoexistence आधिकारिक एपीआई

Python और Node.js में Instagram एपीआई: कार्यरत उदाहरण

Instagram एपीआई को HTTPS के अलावा कुछ नहीं चाहिए, इसलिए Python की requests और Node.js का बिल्ट-इन fetch इसे पूरा करते हैं: POST /<IG_ID>/media, फिर media_publish प्रकाशित करता है; /<IG_MEDIA_ID>/comments और /<IG_COMMENT_ID>/replies कमेंट पढ़ते और उनका जवाब देते हैं; /insights मेट्रिक लौटाता है; और वेबहुक की जाँच raw body के HMAC-SHA256 से होती है। हर गड़बड़ी में code और subcode होता है, जो तय करता है कि दोबारा कोशिश मदद करेगी या नहीं।

easyCoexistence वही काम MCP टूल के रूप में चलाता है Claude, ChatGPT या आपके अपने एजेंट के लिए, टोकन अपनी तरफ़ रखकर: publish_instagram_post, reply_to_comment, get_social_insights और set_social_webhook_destination, Meta के आधिकारिक एपीआई पर।

v26.0

नवीनतम Graph एपीआई वर्ज़न, जो 29 July 2026 को आया; v25.0 29 July 2028 तक उपलब्ध रहेगा।

Once a minute

Meta सुझाता है कि वीडियो कंटेनर का status_code कितनी बार जाँचा जाए, अधिकतम 5 मिनट तक।

50

एक GET /<IG_MEDIA_ID>/comments अनुरोध जितने अधिकतम कमेंट लौटाता है; जवाब केवल फ़ील्ड एक्सपैंशन से आते हैं।

2207008

अस्थायी प्रकाशन गड़बड़ी, जिसमें Meta 30 सेकंड से 2 मिनट के भीतर 1 से 2 बार दोबारा कोशिश करने को कहता है।

sha256=

X-Hub-Signature-256 का प्रीफ़िक्स, जो ऐप सीक्रेट से बने पेलोड के HMAC-SHA256 से पहले आता है।

उदाहरणों को क्या चाहिए?

एक रनटाइम, एक टोकन और चार मान। उदाहरण graph.instagram.com पर Instagram Login से Instagram एपीआई को कॉल करते हैं; Unified Login ऐप वही पाथ इस्तेमाल करता है, पर Facebook Login के Graph होस्ट पर, अपने Business Integration System User टोकन के साथ। Python को वेबहुक के लिए requests पैकेज और Flask चाहिए, और Node.js को अपने बिल्ट-इन fetch के लिए संस्करण 18 या उससे नया।

  • GRAPH: https://graph.instagram.com/v26.0, होस्ट और एपीआई वर्ज़न।
  • IG_ID: प्रोफ़ेशनल खाते का ID, यानी GET /me द्वारा लौटाया गया user_id।
  • TOKEN: एक लंबी अवधि वाला Instagram User एक्सेस टोकन, जो सर्वर पर रखा जाता है।
  • APP_SECRET और VERIFY_TOKEN: वेबहुक अनुरोधों की जाँच के लिए।

Python में एपीआई कैसे कॉल करें और गड़बड़ियाँ कैसे संभालें?

एक हेल्पर के ज़रिए, जिसे नीचे के सभी Python उदाहरण साझा करते हैं। यह टोकन को access_token के रूप में भेजता है, Meta के code, subcode और fbtrace_id के साथ MetaError उठाता है, और केवल वही दोबारा करता है जिसे Meta अस्थायी कहता है: code 1 और 2, थ्रॉटलिंग कोड 4, 17 और 80002, तथा subcode 2207001, 2207003, 2207008 और 2207032। code 4 के साथ subcode 2207051 का अर्थ है स्पैम का संदेह, इसलिए यह तुरंत रुक जाता है।

Python: the shared helper (requests)
import json
import time

import requests

GRAPH = "https://graph.instagram.com/v26.0"
IG_ID = "<IG_ID>"  # user_id from GET /me
TOKEN = "<TOKEN>"  # long-lived Instagram User access token, server side only

RETRY_CODES = {1, 2, 4, 17, 80002}
RETRY_SUBCODES = {2207001, 2207003, 2207008, 2207032}


class MetaError(Exception):
    def __init__(self, error: dict, status: int):
        super().__init__(error.get("message", f"HTTP {status}"))
        self.code = error.get("code")
        self.subcode = error.get("error_subcode")
        self.fbtrace_id = error.get("fbtrace_id")  # log it: Meta support asks for it

    @property
    def needs_new_token(self) -> bool:
        return self.code in (102, 190)

    @property
    def retryable(self) -> bool:
        if self.subcode == 2207051:  # code 4 with this subcode is suspected spam: stop
            return False
        return self.code in RETRY_CODES or self.subcode in RETRY_SUBCODES


def wait_seconds(resp) -> int:
    """estimated_time_to_regain_access from X-Business-Use-Case-Usage, at least 60 s."""
    try:
        usage = json.loads(resp.headers.get("X-Business-Use-Case-Usage", "{}"))
        minutes = max(e.get("estimated_time_to_regain_access", 0) for v in usage.values() for e in v)
    except (ValueError, AttributeError, TypeError):
        minutes = 0
    return max(60, int(minutes) * 60)


def graph(method: str, path: str, attempts: int = 3, **params) -> dict:
    if attempts < 1:
        raise ValueError("attempts must be at least 1")
    params["access_token"] = TOKEN
    for attempt in range(1, attempts + 1):
        resp = requests.request(method, f"{GRAPH}/{path}", params=params, timeout=30)
        try:
            data = resp.json()
        except ValueError:
            data = {}
        if resp.ok and "error" not in data:
            return data
        err = MetaError(data.get("error", {}), resp.status_code)
        if not err.retryable or attempt == attempts:
            raise err
        time.sleep(wait_seconds(resp))

Node.js में एपीआई कैसे कॉल करें और गड़बड़ियाँ कैसे संभालें?

Node.js 18 या उससे नए के लिए उसी हेल्पर से, fetch का उपयोग करके और बिना किसी डिपेंडेंसी के। थ्रॉटल की गई कॉल estimated_time_to_regain_access के मिनटों तक रुकती है, जो Meta X-Business-Use-Case-Usage हेडर में बताता है, या इसके बिना 60 सेकंड, क्योंकि Meta थ्रॉटल के दौरान की गई कॉल भी गिनता है। needsNewToken उन code 190 और 102 को चिह्नित करता है जिन्हें कोई दोबारा कोशिश ठीक नहीं कर सकती।

Node.js: the shared helper (fetch, ES module)
const GRAPH = "https://graph.instagram.com/v26.0";
const IG_ID = process.env.IG_ID; // user_id from GET /me
const TOKEN = process.env.TOKEN; // long-lived Instagram User access token, server side only

const RETRY_CODES = new Set([1, 2, 4, 17, 80002]);
const RETRY_SUBCODES = new Set([2207001, 2207003, 2207008, 2207032]);

export class MetaError extends Error {
  constructor(error, status) {
    super(error.message ?? `HTTP ${status}`);
    this.code = error.code;
    this.subcode = error.error_subcode;
    this.fbtraceId = error.fbtrace_id; // log it: Meta support asks for it
  }
  get needsNewToken() {
    return this.code === 190 || this.code === 102;
  }
  get retryable() {
    if (this.subcode === 2207051) return false; // code 4 with this subcode is suspected spam: stop
    return RETRY_CODES.has(this.code) || RETRY_SUBCODES.has(this.subcode);
  }
}

export const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

// estimated_time_to_regain_access from X-Business-Use-Case-Usage, at least 60 s
function waitMs(res) {
  try {
    const usage = JSON.parse(res.headers.get("x-business-use-case-usage") ?? "{}");
    const minutes = Math.max(0, ...Object.values(usage).flat().map((e) => e.estimated_time_to_regain_access ?? 0));
    return Math.max(60, minutes * 60) * 1000;
  } catch {
    return 60_000;
  }
}

export async function graph(method, path, params = {}, attempts = 3) {
  const url = new URL(`${GRAPH}/${path}`);
  for (const [key, value] of Object.entries({ ...params, access_token: TOKEN })) {
    url.searchParams.set(key, String(value));
  }
  for (let attempt = 1; attempt <= attempts; attempt++) {
    const res = await fetch(url, { method });
    const data = await res.json().catch(() => ({}));
    if (res.ok && !data.error) return data;
    const err = new MetaError(data.error ?? {}, res.status);
    if (!err.retryable || attempt === attempts) throw err;
    await sleep(waitMs(res));
  }
  throw new Error("attempts must be at least 1");
}

Python में फ़ोटो और Reel कैसे प्रकाशित करें?

दोनों कंटेनर फ़्लो का पालन करते हैं। फ़ोटो का कंटेनर तुरंत तैयार होता है, इसलिए media_publish उसके ठीक बाद आता है। Reel का वीडियो पहले प्रोसेस होता है: फ़ंक्शन हर मिनट status_code जाँचता है, अधिकतम 5 मिनट तक, जैसा Meta सुझाता है, FINISHED पर प्रकाशित करता है और ERROR या EXPIRED पर रुक जाता है। इमेज JPEG होनी चाहिए, और मीडिया एक सार्वजनिक यूआरएल पर होना चाहिए।

Python: a photo and a Reel
# Uses graph(), IG_ID and time from the helper above
def publish_photo(image_url: str, caption: str) -> str:
    """A JPEG at a public URL: create the container, then publish it."""
    container = graph("POST", f"{IG_ID}/media", image_url=image_url, caption=caption)
    return graph("POST", f"{IG_ID}/media_publish", creation_id=container["id"])["id"]


def publish_reel(video_url: str, caption: str) -> str:
    """A Reel: publish once Meta has processed the video, checking once a minute."""
    cid = graph("POST", f"{IG_ID}/media", media_type="REELS", video_url=video_url, caption=caption)["id"]
    for _ in range(5):  # Meta: once a minute, for no more than 5 minutes
        time.sleep(60)
        status = graph("GET", cid, fields="status_code")["status_code"]
        if status == "FINISHED":
            return graph("POST", f"{IG_ID}/media_publish", creation_id=cid)["id"]
        if status in ("ERROR", "EXPIRED"):
            raise RuntimeError(f"Container {cid} ended as {status}")
    raise TimeoutError(f"Container {cid} is still processing: check it again later")

Node.js में फ़ोटो और Reel कैसे प्रकाशित करें?

वही दो फ़ंक्शन, हर एक नया मीडिया ID लौटाता है। पाँच जाँच के बाद भी IN_PROGRESS रहने वाला कंटेनर उसके बनने के 24 घंटे तक मान्य रहता है, इसलिए गड़बड़ी संदेश कहता है कि बाद में फिर जाँचें, जिससे खाते की 400 प्रति दिन की सीमा के विरुद्ध दूसरा कंटेनर बनाने से बचा जा सके।

Node.js: a photo and a Reel
// Uses graph(), sleep() and IG_ID from the helper above
export async function publishPhoto(imageUrl, caption) {
  const { id } = await graph("POST", `${IG_ID}/media`, { image_url: imageUrl, caption });
  return (await graph("POST", `${IG_ID}/media_publish`, { creation_id: id })).id;
}

export async function publishReel(videoUrl, caption) {
  const { id } = await graph("POST", `${IG_ID}/media`, { media_type: "REELS", video_url: videoUrl, caption });
  for (let check = 0; check < 5; check++) {
    await sleep(60_000); // Meta: once a minute, for no more than 5 minutes
    const { status_code: status } = await graph("GET", id, { fields: "status_code" });
    if (status === "FINISHED") return (await graph("POST", `${IG_ID}/media_publish`, { creation_id: id })).id;
    if (status === "ERROR" || status === "EXPIRED") throw new Error(`Container ${id} ended as ${status}`);
  }
  throw new Error(`Container ${id} is still processing: check it again later`);
}

Python में कमेंट कैसे पढ़ें और जवाब कैसे दें?

GET /<IG_MEDIA_ID>/comments शीर्ष-स्तरीय कमेंट लौटाता है, नवीनतम पहले, प्रति अनुरोध अधिकतम 50। POST /<IG_COMMENT_ID>/replies किसी एक पर सार्वजनिक जवाब भेजता है। फ़ंक्शन हर जवाब का टेक्स्ट आपके कॉलबैक से माँगता है और जिन कमेंट के लिए वह कुछ नहीं लौटाता उन्हें छोड़ देता है। छिपे हुए कमेंट पर जवाब नहीं दिया जा सकता, और जवाब के जवाब शीर्ष-स्तरीय कमेंट पर जाते हैं।

Python: read comments and reply
# Uses graph() from the helper above
def reply_to_comments(media_id: str, write_reply) -> int:
    """Reply in public to each comment write_reply returns text for."""
    page = graph("GET", f"{media_id}/comments", fields="id,text,username,timestamp")
    sent = 0
    for comment in page.get("data", []):
        text = write_reply(comment)
        if text:
            graph("POST", f"{comment['id']}/replies", message=text)
            sent += 1
    return sent


# Example: reply to questions about price
reply_to_comments("<IG_MEDIA_ID>", lambda c: "Prices are in our bio link." if "price" in c["text"].lower() else None)

Node.js में कमेंट कैसे पढ़ें और जवाब कैसे दें?

Node.js में वही लूप। दोनों कॉल instagram_business_basic और instagram_business_manage_comments माँगती हैं, और username फ़ील्ड को दूसरे की ज़रूरत होती है। निजी तौर पर जवाब देने के लिए, POST /<IG_ID>/messages को recipient.comment_id के साथ भेजें; यह कमेंट करने वाले को एक DM भेजता है, कमेंट के 7 दिन के भीतर, और आगे का संदेश तब तक रुकता है जब तक वे जवाब न दें।

Node.js: read comments and reply
// Uses graph() from the helper above
// Reply in public to each comment writeReply returns text for
export async function replyToComments(mediaId, writeReply) {
  const { data = [] } = await graph("GET", `${mediaId}/comments`, { fields: "id,text,username,timestamp" });
  let sent = 0;
  for (const comment of data) {
    const text = writeReply(comment);
    if (text) {
      await graph("POST", `${comment.id}/replies`, { message: text });
      sent++;
    }
  }
  return sent;
}

// Example: reply to questions about price
await replyToComments("<IG_MEDIA_ID>", (c) => (/price/i.test(c.text) ? "Prices are in our bio link." : null));

Python में इनसाइट कैसे पढ़ें?

खाते के इनसाइट period=day और metric_type=total_value लेते हैं, और हर मेट्रिक तब total_value.value रिपोर्ट करती है; पोस्ट के इनसाइट values[0].value रिपोर्ट करते हैं। उदाहरण खाते पर reach, views और accounts_engaged मांगता है, और पोस्ट या Reel पर reach, views, likes, comments, saved और shares, जिन्हें Meta का संदर्भ दोनों के लिए सूचीबद्ध करता है। जिस मेट्रिक का डेटा नहीं है उसे 0 लौटाने के बजाय छोड़ दिया जाता है।

Python: account and post insights
# Uses graph() and IG_ID from the helper above
def account_insights() -> dict:
    """Reach, views and accounts engaged over the last 24 hours."""
    data = graph("GET", f"{IG_ID}/insights", metric="reach,views,accounts_engaged",
                 period="day", metric_type="total_value")["data"]
    return {m["name"]: m["total_value"]["value"] for m in data}


def post_insights(media_id: str) -> dict:
    """Totals for one post or Reel."""
    data = graph("GET", f"{media_id}/insights", metric="reach,views,likes,comments,saved,shares")["data"]
    return {m["name"]: m["values"][0]["value"] for m in data}

Node.js में इनसाइट कैसे पढ़ें?

Node.js में वही दो अनुरोध, हर एक मेट्रिक नाम से कुंजीबद्ध एक ऑब्जेक्ट लौटाता है। कोई ब्रेकडाउन नहीं भेजा जाता: Meta चेतावनी देता है कि जो मेट्रिक इसका समर्थन नहीं करती उसके लिए माँगने पर अनुरोध unknown error के साथ विफल होता है, और इनसाइट डेटा 48 घंटे तक पीछे रह सकता है, इसलिए नई पोस्ट बाद में फिर पढ़ें।

Node.js: account and post insights
// Uses graph() and IG_ID from the helper above
// Reach, views and accounts engaged over the last 24 hours
export async function accountInsights() {
  const { data } = await graph("GET", `${IG_ID}/insights`, {
    metric: "reach,views,accounts_engaged",
    period: "day",
    metric_type: "total_value",
  });
  return Object.fromEntries(data.map((m) => [m.name, m.total_value?.value]));
}

// Totals for one post or Reel
export async function postInsights(mediaId) {
  const { data } = await graph("GET", `${mediaId}/insights`, { metric: "reach,views,likes,comments,saved,shares" });
  return Object.fromEntries(data.map((m) => [m.name, m.values?.[0]?.value]));
}

Python में वेबहुक कैसे सत्यापित करें?

Flask के साथ, एक ही पाथ पर दो रूट में। GET Meta के सत्यापन अनुरोध का जवाब देता है: जब hub.mode subscribe हो और hub.verify_token मेल खाए, तो यह hub.challenge सादे टेक्स्ट में लौटाता है, अन्यथा 403। POST raw body का HMAC-SHA256, ऐप सीक्रेट के साथ, sha256= के साथ जोड़कर गणना करता है, उसकी तुलना X-Hub-Signature-256 से constant time में करता है, और किसी भी धीमे काम से पहले 200 लौटाता है।

Python: webhook verification and signature check (Flask)
import hashlib
import hmac
import json
import os
from queue import Queue

from flask import Flask, abort, request

app = Flask(__name__)
VERIFY_TOKEN = os.environ["VERIFY_TOKEN"]
APP_SECRET = os.environ["APP_SECRET"].encode()
jobs: Queue = Queue()  # swap for your own job queue


@app.get("/webhooks/instagram")
def verify():
    """Meta's verification request: send hub.challenge back when the token matches."""
    args = request.args
    if args.get("hub.mode") == "subscribe" and args.get("hub.verify_token") == VERIFY_TOKEN:
        return args.get("hub.challenge", ""), 200, {"Content-Type": "text/plain"}
    abort(403)


@app.post("/webhooks/instagram")
def receive():
    """An event: check X-Hub-Signature-256 over the raw bytes, then answer at once."""
    raw = request.get_data()
    expected = b"sha256=" + hmac.new(APP_SECRET, raw, hashlib.sha256).hexdigest().encode()
    if not hmac.compare_digest(expected, request.headers.get("X-Hub-Signature-256", "").encode()):
        abort(401)
    for entry in json.loads(raw).get("entry", []):
        jobs.put(entry)  # slow work happens elsewhere; Meta wants a quick 200
    return "", 200

Node.js में वेबहुक कैसे सत्यापित करें?

बिना किसी फ़्रेमवर्क के, बिल्ट-इन http मॉड्यूल से। body को किसी भी पार्सिंग से पहले raw बाइट्स में इकट्ठा किया जाता है, क्योंकि पार्स करके दोबारा सीरियलाइज़ की गई body उस सिग्नेचर से मेल नहीं खाती जो Meta ने बनाया। Meta विफल सूचना को 36 घंटे तक दोबारा भेजता है, इसलिए हैंडलर को उन इवेंट को भी छोड़ना चाहिए जो वह पहले ही संसाधित कर चुका है।

Node.js: webhook verification and signature check (node:http)
import crypto from "node:crypto";
import http from "node:http";

const { VERIFY_TOKEN, APP_SECRET } = process.env;
const PATH = "/webhooks/instagram";
const jobs = []; // swap for your own job queue

http
  .createServer((req, res) => {
    const url = new URL(req.url, "http://localhost");
    if (url.pathname !== PATH) return res.writeHead(404).end();

    if (req.method === "GET") {
      // Meta's verification request: send hub.challenge back when the token matches
      const ok =
        url.searchParams.get("hub.mode") === "subscribe" &&
        url.searchParams.get("hub.verify_token") === VERIFY_TOKEN;
      return res
        .writeHead(ok ? 200 : 403, { "Content-Type": "text/plain" })
        .end(ok ? url.searchParams.get("hub.challenge") ?? "" : "");
    }

    const chunks = [];
    req.on("data", (chunk) => chunks.push(chunk));
    req.on("end", () => {
      const raw = Buffer.concat(chunks); // the exact bytes Meta signed
      const expected = Buffer.from("sha256=" + crypto.createHmac("sha256", APP_SECRET).update(raw).digest("hex"));
      const given = Buffer.from(req.headers["x-hub-signature-256"] ?? "");
      if (given.length !== expected.length || !crypto.timingSafeEqual(given, expected)) {
        return res.writeHead(401).end();
      }
      res.writeHead(200).end(); // answer first, work after
      try {
        for (const entry of JSON.parse(raw.toString("utf8")).entry ?? []) jobs.push(entry);
      } catch {
        // not JSON: nothing to queue
      }
    });
  })
  .listen(3000);

कोड को किन Meta गड़बड़ियों पर दोबारा कोशिश करनी चाहिए?

केवल अस्थायी गड़बड़ियों पर, क्योंकि बाकी कुछ बदलने तक वही उत्तर देती रहती हैं: फ़ाइल, यूआरएल, अनुमति या खाते की स्थिति। Meta के गड़बड़ी संदर्भ हर उस code के लिए क्या करना है यह बताते हैं, जिन्हें ऊपर के हेल्पर अलग पहचानते हैं:

1, 2Temporary or downtime: wait, then retry
4, 17, 80002Throttling: wait for estimated_time_to_regain_access, then retry
4 with 2207051Suspected spam: stop, since a retry repeats the action
2207001, 2207003, 2207032Server error, download timeout or failed container: try again
2207008Container briefly missing: retry 1 to 2 times within 2 minutes
190, 102Token expired or invalid: refresh it while valid, or sign in again
10, 200 to 299Permission missing or removed: request it at sign-in
25 with 2207050Account restricted: the owner acts in the Instagram app
9 with 2207042Daily publishing limit: try again the next day
9004 with 2207052Media not fetched from the URL: fix the link

easyCoexistence के क्रेडेंशियल पर वही कोड कैसे चलाएँ?

आप इसे easyCoexistence के टोकन पर नहीं चला सकते: Instagram टोकन कभी दिए नहीं जाते (Meta की शर्तें), इसलिए get_social_credentials और Partner एपीआई का GET /api/v1/channels/:id?credentials=1 खाते की ID और API base बिना टोकन के लौटाते हैं। इसके बजाय वही काम MCP टूल के रूप में चलते हैं, Claude, ChatGPT या किसी अन्य MCP क्लाइंट के ज़रिए, और ऊपर के हेल्पर आपके अपने Meta ऐप के टोकन पर बिना बदलाव चलते हैं।

What get_social_credentials returns for an Instagram account
{
  "platform": "instagram",
  "graph_api_base": "https://graph.instagram.com/<VERSION>",
  "account_id_on_meta": "<IG_ID>",
  "access_token": null,
  "token_note": "Meta's terms do not allow handing this account's access token to other apps, so it is not shown. ..."
}

MCP कनेक्टर के ज़रिए वही काम कैसे करें?

सहायक से पूछकर, या टूल खुद कॉल करके। publish_instagram_post कंटेनर बनाकर उसे प्रकाशित करता है, वीडियो प्रोसेस होने तक इंतज़ार करते हुए, या scheduled_at के साथ 90 दिन आगे तक शेड्यूल करता है; reply_to_comment सार्वजनिक जवाब देता है, या private को true करने पर DM से निजी तौर पर; get_social_insights मेट्रिक नाम सीधे Meta को भेजता है; और set_social_webhook_destination कमेंट, मेंशन और DM आपके एंडपॉइंट पर भेजता है, X-EC-Signature के साथ साइन किए हुए।

MCP tool calls for the same jobs
[
  {
    "name": "publish_instagram_post",
    "arguments": {
      "account_id": "<from list_social_accounts>",
      "type": "REELS",
      "video_url": "https://cdn.example.com/launch.mp4",
      "caption": "Launch day.",
      "scheduled_at": "2026-11-06T09:00:00-03:00"
    }
  },
  {
    "name": "list_social_comments",
    "arguments": { "account_id": "<ACCOUNT_ID>", "post_id": "<IG_MEDIA_ID>" }
  },
  {
    "name": "reply_to_comment",
    "arguments": { "account_id": "<ACCOUNT_ID>", "comment_id": "<IG_COMMENT_ID>", "text": "Prices are in our bio link." }
  },
  {
    "name": "get_social_insights",
    "arguments": {
      "account_id": "<ACCOUNT_ID>",
      "metrics": ["reach", "views", "accounts_engaged"],
      "period": "day",
      "params": { "metric_type": "total_value" }
    }
  },
  {
    "name": "set_social_webhook_destination",
    "arguments": { "account_id": "<ACCOUNT_ID>", "url": "https://hooks.example.com/instagram" }
  }
]

आम गड़बड़ियाँ

  • पार्स किए गए JSON का हैश बनाना। Meta raw बाइट्स पर साइन करता है, इसलिए फ़्रेमवर्क का JSON body पार्सर X-Hub-Signature-256 जाँच तोड़ देता है; raw body रखें और बाद में पार्स करें।
  • timeout के बाद बिना देखे media_publish फिर से कॉल करना। यदि कंटेनर का status_code PUBLISHED दिखाता है, तो पोस्ट पहले से लाइव है।
  • subcode के बिना code 4 को थ्रॉटलिंग मानना। 2207051 के साथ इसका अर्थ है कि Instagram को स्पैम का संदेह है, और दोबारा कोशिश वही कार्य दोहराती है जिस पर अभी प्रतिबंध लगा।
  • ब्राउज़र या मोबाइल कोड से ऐप सीक्रेट या टोकन भेजना। Meta कहता है कि ऐप सीक्रेट वाले अनुरोध केवल सर्वर-साइड कोड में होने चाहिए।
EasyCoexistence के साथ ऐसा करना

प्रति कनेक्शन प्रति माह US$ 9 से US$ 0.75 तक, कनेक्शन जोड़ने पर घटती दर, पहले 3 दिन मुफ़्त।

अक्सर पूछे जाने वाले सवाल

क्या Instagram एपीआई को कॉल करने के लिए SDK चाहिए?

नहीं। हर कॉल एक एक्सेस टोकन के साथ HTTPS अनुरोध है, इसलिए Python में requests या Node.js में fetch काफ़ी है, जैसा इस पेज के उदाहरण दिखाते हैं।

Reel कंटेनर बनते ही media_publish क्यों विफल होता है?

वीडियो अभी प्रोसेस हो रहा है: गड़बड़ी 9007 के साथ subcode 2207027। कंटेनर का status_code हर मिनट जाँचें और FINISHED दिखने पर प्रकाशित करें।

कोड को कौन-सा एपीआई वर्ज़न इस्तेमाल करना चाहिए?

वह एक जो Meta अब भी देता है: v26.0 नवीनतम है, और हर वर्ज़न कम से कम दो साल चलता है। हटाए गए वर्ज़न पर की गई कॉल अगले सबसे पुराने उपलब्ध वर्ज़न पर चलती है।

Instagram खाते के एपीआई एक्सेस के लिए easyCoexistence की कीमत कितनी है?

हर Instagram खाता एक कनेक्शन है: प्रति कनेक्शन प्रति माह US$ 9 से US$ 0.75 तक, कनेक्शन जोड़ने पर घटती दर, पहले 3 दिन मुफ़्त।

पढ़ना जारी रखें

2026 के लिए Instagram एपीआई गाइड: आपके ऐप से पहली पोस्ट तक2026 में Instagram एपीआई का रास्ता, चरण दर चरण: खाता प्रकार, लॉगिन सेटअप, Meta ऐप, अनुमतियां, टोकन, पहली पोस्ट, कमेंट, DM, वेबहुक और सीमाएं।Instagram API कनेक्शन काम करना क्यों बंद करता है, और उसे चालू कैसे रखेंInstagram API कनेक्शन रुकने के कारण: टोकन की समयसीमा खत्म, पासवर्ड बदलना, अनुमति या ऐप हटाना, पर्सनल खाता या प्रतिबंध, और हर उपाय।Instagram एक्सेस टोकन: लंबे समय तक चलने वाले टोकन, 60 दिन और रिफ़्रेशInstagram Login टोकन कैसे काम करते हैं: लॉगिन के बाद एक घंटे का टोकन, 60 दिन वाला लंबी अवधि का टोकन और 24 घंटे बाद उसका रिफ़्रेश।Instagram वेबहुक इवेंट: कमेंट, मेंशन और DMInstagram के कमेंट, मेंशन और DM एंडपॉइंट तक वेबहुक इवेंट के रूप में कैसे पहुँचते हैं: हर पेलोड में क्या है, डिलीवरी कैसे साइन होती है, और क्या जाँचें।Instagram API पब्लिश सीमाएँ: फ़ॉर्मैट, साइज़ और प्रतिदिन पोस्टInstagram API पोस्ट में क्या आ सकता है और प्रतिदिन कितनी: 8 MB तक JPEG, रील, स्टोरी, 2,200 अक्षरों के कैप्शन, 24 घंटे में 100 पोस्ट।Claude और ChatGPT के लिए Instagram MCP सर्वरClaude, ChatGPT और AI एजेंटों के लिए Instagram MCP सर्वर: पोस्ट, Reels, Stories शेड्यूल करें, कमेंट व DM का जवाब दें, इनसाइट्स पढ़ें।

दो मिनट में अपना पहला चैनल कनेक्ट करें।

किसी प्लैटफ़ॉर्म की समीक्षा का इंतज़ार नहीं। WhatsApp, Instagram, TikTok या कोई और चैनल कनेक्ट करें, फिर अपने AI से पोस्ट करने, जवाब देने या रिपोर्ट बनाने को कहें और उसे काम करते देखें।

  • 3 दिन मुफ़्त
  • कभी भी रद्द करें
  • सिर्फ़ आधिकारिक एपीआई
  • 24/7 निगरानी

इस तारीख को सत्यापित