DEV Community

Mirfa Zainab
Mirfa Zainab

Posted on

Can I get DMs from the API?

Actually , No — the official Instagram Graph API does not provide access to DMs (Direct Messages) for personal or creator accounts.

Here’s the breakdown:

  1. Official API (Meta’s Instagram Graph API)

You cannot read, send, or manage DMs from this API.

It only supports business accounts and mainly focuses on:

Posts, Reels, and Stories management

Insights and analytics

Comments and mentions

Hashtag search

So, even if you explore the docs in this GitHub repo
, you’ll notice there’s no endpoint for DMs — only comment and message-related endpoints for Facebook Pages (not Instagram).

  1. Unofficial or Private APIs

Some developers use reverse-engineered private endpoints (like direct_v2/inbox/) to fetch DMs.
These are not approved by Meta, and using them can:

Get your account banned or rate-limited

Require session cookies or tokens from real devices

Break anytime Instagram updates its backend

  1. Alternative Options

If your goal is to automate communication, consider:

Instagram Messaging API for Businesses via Meta’s WhatsApp Business Platform (requires Facebook Page + Instagram Business link)

Using tools that simulate device behavior (see Instagram API Documentation repo
)
for learning/testing, not production

In summary:
✅ Official API — No DMs access
⚠️ Private API — Possible but risky
💡 Safer alternative — Use Meta’s Business Messaging API

Top comments (0)