New TikTok Comment-to-DM is now on OnlySocialSend a DM to people who ask buying questions in your TikTok comments, automatically. See how it works
Network APIs

The Instagram API for posts, Reels, DMs and insights

The OnlySocial Instagram API lets your app publish feed posts, carousels, Reels and Stories, answer DMs and comments, and read account insights with one workspace key. You skip Meta app review, business verification and token refreshes, and the same requests reach Facebook, TikTok, LinkedIn and 12 more networks.

No Meta app reviewAccounts connect inside OnlySocial, so your app never needs its own Meta app, permissions review or business verification.
Publishing and messagingPost Reels and carousels, then answer the DMs and comments they bring in, from the same workspace and the same key.
Rules checked before postingMedia counts, video lengths and the hashtag limit are checked when you schedule, so a post fails early instead of at publish time.

What the Instagram Graph API asks of you

Meta offers two official routes. The Instagram Graph API works through Facebook Login and needs each Instagram professional account to be linked to a Facebook Page. The newer Instagram API with Instagram Login works without a Page. Either way you create a Meta app, request the permissions you need, pass app review for each one and often complete business verification before real customers can connect. Our Instagram app review guide covers which permissions to request and what reviewers look for.

Then the work starts. Publishing is a two-step container flow: create a media container, wait for Instagram to process it, then publish it. Carousels need a container per item. Each account can publish a limited number of posts through the API in a rolling 24 hours, and Meta's own documents have shown both 50 and 100, so careful apps read the live limit before they post. Tokens expire and must be refreshed, and personal accounts are not supported at all since Meta retired the Basic Display API.

Messaging is a separate set of permissions and webhooks again, with its own 24-hour reply window. Building all of this is possible, but it is a long project, and Meta changes it every year.

  • A Meta app, permission review and often business verification
  • Container-based publishing with processing waits
  • A per-account publishing limit in a rolling 24 hours
  • Separate permissions and webhooks for DMs and comments

Publish posts, carousels, Reels and Stories

One request to the posts endpoint publishes to any connected Instagram account, now, at a set time or in the next free queue slot. The type option picks the format. A post takes one image or video, or a carousel of up to ten photos plus a video. A Reel takes exactly one video between 3 seconds and 15 minutes, and a Story takes one image or a video of up to 60 seconds. A post with a single video goes out as a Reel, because Instagram no longer accepts single feed videos.

Captions can run to 2,200 characters with up to five hashtags, the limit Instagram now applies. Add a second content item and it is posted as the first comment, which many brands use for links or extra context. Stories do not carry captions or comments.

Every check runs when you schedule the post, not when it publishes. If a Reel is too long or a carousel has too many items, the request is refused with a clear reason, so your app can fix it while the user is still there. Our Instagram scheduler page shows the same publishing in the app.

  • Feed posts and carousels of up to 10 photos and a video
  • Reels from 3 seconds to 15 minutes, Stories up to 60 seconds
  • 2,200-character captions with up to 5 hashtags
  • First comment on posts and Reels

When Instagram refuses a post

If Instagram still turns a post down at publish time, for example because the account lost a permission, the post shows Instagram's own error for that account and the publishing failed webhook fires. Fix the cause and retry that account alone, without posting again to the other networks.

Upload media for posts, Reels and Stories

Every Instagram post starts in the workspace's media library. Through the Instagram API your code can upload a file directly, send a large video in chunks, or pass a public URL and let OnlySocial download it in the background. Each upload returns a media ID, and the post's content item lists the IDs it uses, so the same clip can go to Instagram as a Reel, to TikTok and to YouTube without being uploaded three times.

Instagram's rules depend on the format. A feed post needs at least one image or video, and a carousel can mix up to ten photos and one video. A Reel takes exactly one video between 3 seconds and 15 minutes. A Story takes exactly one image, or one video between 3 and 60 seconds. OnlySocial checks the media against the type you chose when you schedule, so a Story with two files or a Reel that runs too long is refused before it is queued.

Folders keep a busy library tidy, for example one folder per product launch or per client, and your team sees the same folders in the app. When you upload from a URL, check that the download has finished before you create the post, so the post is not scheduled against a file that is still arriving.

  • Direct, chunked or remote URL uploads
  • Carousels of up to 10 photos and 1 video
  • Reels from 3 seconds to 15 minutes
  • Stories with one image or a video of 3 to 60 seconds

A worked example

Marlow Studio, our example shop, uploads a 30-second clip of its new tote from a URL and a set of four product photos as files. It then creates two posts with the Instagram API: a Reel from the clip, with a first comment carrying the shop link, and a carousel from the photos scheduled for the next morning. Both appear on the shared calendar for the team to check.

Instagram Reels API options

Reels get the options Instagram's own app offers to scheduling tools. Invite up to three collaborators so the Reel shows on their profiles too, share the Reel to your Story as it publishes, or publish it as a trial Reel that is shown to people who do not follow you first. A trial Reel can be promoted to your followers by hand or automatically when it performs well.

Through the Instagram Reels API in OnlySocial you can also attach a music track or original sound and set the volume of the track against the video's own audio. A cover frame chosen in the composer is kept when the Reel is published.

Two ways to connect

Accounts can connect with Facebook Login, through a linked Page, or with Instagram Login, with no Page at all. Publishing works the same either way; competitor benchmarks need Facebook Login.

Instagram DM API for replies and comment-to-DM

Connected Instagram accounts also bring their DMs and comments into the unified inbox, and the Messaging API exposes them. List conversations, read the messages, send a text, image or video reply, or answer a public comment, all from your own code. Every message received or sent fires a webhook, and a comment arrives with its post ID and link so you know what the person reacted to.

Automations work alongside the Instagram DM API. A keyword in a comment can open a private DM with a link, tag the contact and move them along your pipeline, and the AI Salesbot can answer the questions that follow. Read about comment to DM automations and the social media messaging API for the details.

  • Read conversations and send DM replies
  • Reply to public comments with the comment's post and link
  • Webhooks for every message received and sent
  • Comment-to-DM automations and the AI Salesbot

Instagram analytics API for reports

The Instagram analytics API endpoints return what a client report needs: follower growth with gains and losses, likes, comments, shares, saves and reposts split by posts, Reels and Stories, reach and views from followers and non-followers, and audience breakdowns by age, gender, country and city. Hashtag and content tabs show which posts and tags worked.

Post analytics report how one published post did, and the best time endpoint suggests when to publish next based on your own last 180 days. Accounts connected with Facebook Login can also compare themselves with competitor accounts.

Which endpoints to call

The Instagram analytics API is read-only. Call the account endpoint with a date range for the overview and tabs, the post endpoint for one published post, and the best times endpoint before you schedule. A key with only analytics scopes can read all of it without being able to publish.

Webhooks, keys and limits

Publishing events tell your system when a post is scheduled, published on each account, published everywhere or failed, and when an Instagram account loses its connection so you can send the owner a reconnect link. Messaging events cover every message received, sent, read or failed, with the contact and the conversation attached.

Each workspace key starts with osk_ and carries scopes, so a reporting tool can read insights without being able to post or send messages. A key allows 60 requests a minute. Instagram's own publishing limit per account still applies, and OnlySocial reports it clearly when an account reaches it.

  • Publishing and messaging webhooks on one subscription
  • Scoped keys for publishing, messaging and analytics
  • Clear errors when Instagram's own limits are reached

Instagram API errors, retries and reconnects

Most problems are caught before anything reaches Instagram. When you create, schedule or queue a post, OnlySocial checks each network's rules and answers with a 422 and one error per problem, keyed by version and network. A caption with more than five hashtags or a feed post with no media comes back with a plain message, and nothing is saved or scheduled until the request is fixed. Drafts are not checked, so you can save work in progress.

Some failures only show up at publish time, for example when Instagram refuses the media or the account has reached its publishing limit for the day. The post then shows Instagram's own error for that account, and the publishing.post.publishing_failed webhook is sent once for that account. Fix the cause and retry that account alone. Accounts that already published are left as they are, so nobody sees the same Reel twice.

Access can also end, when a token can no longer be refreshed or a permission is removed. The account is then marked for reconnection and the publishing.account.disconnected webhook fires, so your system can send the owner a reconnect link before the next post is due.

Message delivery events

For DMs, Instagram reports when a message is sent, read or failed, but Meta sends no delivery receipt for Instagram, so there is no delivered event for this channel. Treat read as the strongest signal you will get.

Staying within the rate limit

A workspace key allows 60 requests a minute. Scheduling a month of posts for several accounts fits easily, and one post can list many accounts at once, each with its own version.

Connect your customers to the Instagram API with the Partner API

If you build software for other businesses, your customers should not need an OnlySocial login to connect their Instagram accounts. The Partner API covers that side. From your backend you create a customer's account and their own workspace, sign them into OnlySocial from your app with single sign-on, and issue the workspace key your integration then uses for every Instagram API call.

The Client Connect API is the part your customers see. You create a connection for the provider instagram_direct and get back a link that lasts 30 minutes. The customer opens it, signs in with Instagram, with no Facebook Page needed (use instagram instead to sign in with Facebook and tick the professional accounts linked to a Page), and the account appears in their workspace ready to publish, and where the workspace has an inbox, to answer DMs and comments from. No Instagram token ever reaches your software or their browser.

When a sign-in expires, the same endpoint makes a reconnect link for that account. The account keeps its id, its scheduled posts and its history, and the customer must sign in as the same profile. A webhook, publishing.account.connection.completed or .failed with an error code, tells your code how it went, and an allowance call says whether the customer's plan has room for another account before you show a Connect button.

Both are switched on per partner, so read the Partner API docs and the Client Connect API docs, then ask us for access. White label plans that include the Partner API create the same keys in their own dashboard, and the connect pages carry their brand.

  • Create customers and workspaces from your backend
  • Single sign-on from your app into OnlySocial
  • Hosted connect and reconnect links for Instagram

What teams build on the Instagram API

Online stores publish a Reel when a product comes back in stock, then let a comment keyword send each buyer the link in a DM. Agencies run client accounts from their own portal with approvals, and pull the Instagram analytics API data into monthly reports. SaaS products add Instagram publishing for their own users with a connect link, so their users never see OnlySocial.

Because the same request takes a version for each network, a team that starts with the Instagram API can add Facebook, TikTok and LinkedIn later without new code paths. Our social media API page covers every network and API.

Creators and coaches use the Instagram API with an AI assistant: they ask Claude or ChatGPT, connected through the OnlySocial MCP server, to draft a week of Reels captions, schedule them in the best slots and summarise which posts brought in the most DMs. The assistant uses the same actions as the API, and anything marked for approval waits for a person.

Start with the Instagram API in four steps

  1. Step 1

    Connect the account

    Connect an Instagram professional account in OnlySocial with Facebook Login or Instagram Login.

  2. Step 2

    Create a key

    Create a workspace key with publishing and, if you need them, messaging scopes. Keep the secret on your server.

  3. Step 3

    Publish a Reel

    Upload the video to the media library, then create a post with the Instagram type set to reel.

  4. Step 4

    Answer the replies

    Subscribe to message webhooks and reply to DMs and comments through the Messaging API.

Instagram Graph API directly or through OnlySocial

Both reach the same professional accounts. OnlySocial removes the app review and the plumbing, and adds scheduling and an inbox.

FeatureInstagram Graph APIOnlySocial API
Meta app review and verificationYou do itNot needed
Scheduling and posting queueNoYes
Media rules checked before publishingPartlyYes
DMs, comments and automationsSeparate setupYes
Other networks in the same callNo15 more
Personal Instagram accountsNoNo

What OnlySocial customers say

Rated 4.4 out of 5 from 61 reviews on Trustpilot. Read every review

Best all in one Social Media Automation

I have agency tier. Onlysocial is the best all in one social media manager. … You can automate tasks, social media replies and comments as well as the option to post video, images, or even a selection of selected memes.

Giancarlo BianchiSpain · Jul 2024 on Trustpilot
GOOD

Infinite accounts, API endpoint, all good.

Alessandro SmedileItaly · Apr 2026 on Trustpilot
OnlySocial Software has impressed me

The variety of available integrations is impressive, allowing the consolidation of many services, saving costs, and simplifying management.

Michael HemmersbachGermany · Jul 2024 on Trustpilot

Instagram API FAQ

Something else? The help and API docs cover every feature.

Do I need Meta app review to use the Instagram API through OnlySocial?

No. Accounts connect to OnlySocial's own approved apps, so your integration only needs an OnlySocial workspace key.

Can the Instagram API post to personal accounts?

No. Instagram only allows publishing to professional accounts, business or creator, through any API. Switching an account to professional is free in the Instagram app.

How many posts can I publish a day?

Instagram limits each account to a number of API-published posts in a rolling 24 hours, and a carousel counts as one. Normal schedules stay far below it.

Can I schedule Stories and Reels?

Yes. Set the Instagram type to story or reel. Stories take one image or a video of up to 60 seconds. Link stickers are not available to any API, so add those in the app.

Why is my caption refused for hashtags?

Instagram now allows up to five hashtags per post, and OnlySocial checks that when you schedule. Move extra tags out or trim them.

Can I post a carousel with the Instagram API?

Yes. Give a feed post two or more media IDs: up to ten photos and one video, mixed in the order you list them. A carousel counts as one post against Instagram's daily publishing limit.

What happens if an Instagram post fails to publish?

The post shows Instagram's error for that account and the publishing failed webhook fires. Fix the cause, such as a refused file or a lost permission, and retry that account without posting again to the other networks.

How do I connect my customers' Instagram accounts to the Instagram API?

Each customer connects their professional account in an OnlySocial workspace. Agencies and SaaS products can create those workspaces and connect channels through the Partner API where Account Connect is switched on, so customers never need their own Meta app.

Can I send Instagram DMs through the API?

Yes, through the Messaging API: reply to people who messaged the account, within Instagram's reply window, or answer their comments. Automations can open a DM from a comment keyword.

Which Instagram analytics can I read?

Follower growth, engagement split by posts, Reels and Stories, reach and views, audience demographics, hashtags, top content, post analytics and best posting times.

Publish to Instagram from your own code

Connect an account, create a key and post your first Reel today. The same Instagram API request reaches Facebook, TikTok, YouTube and 12 more networks.

Scroll to Top