TL;DR
- What is it? The Instagram Graph API lets you programmatically publish Posts, Reels, Stories, and Carousels.
- The Problem: Two different OAuth methods, container-based publishing, processing wait times, and strict media requirements.
- The Solution: Use a unified API that handles all the complexity with one endpoint.
- Result: Upload to Instagram (+ 13 other platforms) with a single API call.
Why Instagram API Automation is Harder Than You Think
If you’ve searched for “instagram api upload video” or “instagram api post automation,” here’s the thing - Meta doesn’t make this simple. Here’s what you’re actually signing up for:- Two Different OAuth Paths - Instagram via Facebook, or Instagram Direct. Different scopes, different flows, different headaches.
- Container-Based Publishing - You don’t just “post.” You create a container, wait for it to process, then publish it.
- Strict Media Requirements - Wrong aspect ratio? Wrong resolution? Wrong bitrate? Rejected.
- App Review - Meta requires detailed app review with screen recordings and explanations.
- Professional/Business Accounts Only - Personal accounts can’t use the API.
The Instagram Publishing Flow (What Actually Happens)
Unlike simpler APIs, Instagram uses a two-step container system.Step 1: Create a Container
You upload your media and create a “container” - a draft that Instagram processes:creation_id. Your media is now processing.
Step 2: Wait for Processing
Here’s the fun part. You can’t publish immediately. You have to poll:IN_PROGRESS- Still processing. Wait.FINISHED- Ready to publish.ERROR- Something failed. Check status field for why.
Step 3: Publish the Container
Only after status isFINISHED:
My Experience
From what I’ve seen, even enterprise teams underestimate Instagram’s complexity. When I was at [redacted], our marketing tools team thought Instagram integration would be a quick project - they’d already done Twitter and LinkedIn. Two weeks in, they were still debugging the container flow. The polling logic was flaky. Videos that worked fine locally would fail with cryptic errors. The app review took three attempts because Meta kept asking for more documentation. Real talk - Instagram’s API is one of the most frustrating to implement correctly. The container system makes sense from Meta’s perspective (async processing), but it adds significant complexity for developers.The Media Requirements Maze
Instagram is notoriously strict about media specs. Here’s what you’re dealing with:Reels Requirements
| Requirement | Specification |
|---|---|
| Format | MP4, MOV |
| Duration | 3 seconds - 15 minutes |
| Resolution | Max 1920px width |
| Aspect Ratio | 0.01:1 to 10:1 (9:16 recommended) |
| Bitrate | Max 45 Mbps |
| Frame Rate | 23-60 fps |
Stories Requirements
| Requirement | Specification |
|---|---|
| Format | MP4, MOV, JPG, PNG |
| Duration | 3 - 60 seconds (video) |
| File Size | Max 100MB (video), 8MB (image) |
| Resolution | Max 1920px width |
| Aspect Ratio | 0.01:1 to 10:6 (9:16 recommended) |
| Bitrate | Max 25 Mbps |
Feed Posts Requirements
| Requirement | Specification |
|---|---|
| Image Aspect Ratio | 4:5 to 1.91:1 |
| Video Aspect Ratio | 0.01:1 to 10:1 |
| Video Duration | 3 seconds - 15 minutes |
| Image File Size | Max 8MB |
| Carousel Limit | 2-10 items |
Skip the Complexity: One API for Instagram + 13 Other Platforms
At bundle.social, we’ve already done the hard work. Our unified API handles:- Container creation and status polling
- Media validation and preprocessing
- Token refresh and OAuth management
- Retry logic for transient failures
- All three post types (Posts, Reels, Stories)
How to Upload Instagram Content with bundle.social API
Upload a Reel
Upload a Carousel Post
Instagram Carousels (up to 10 images/videos) are notoriously complex via the direct API. With bundle.social:Upload a Story
Stories don’t support captions via API - that’s an Instagram limitation, not ours.
Instagram API: Node.js Full Example
Instagram API: Python Full Example
Instagram-Specific Options
Here are all the Instagram options you can configure:| Option | Type | Description |
|---|---|---|
type | "POST" | "REEL" | "STORY" | Content type |
text | string | Caption (max 2000 characters) |
uploadIds | string[] | Your uploaded media IDs |
shareToFeed | boolean | Show Reel in feed (Reels only, default: true) |
thumbnail | string | Cover image URL (Reels only) |
thumbnailOffset | number | Frame position in ms for video cover |
collaborators | string[] | Instagram usernames for Collab (max 3) |
tagged | array | User tags with x/y coordinates (max 20) |
Advanced: Collaborators and Tagged Users
Collab Posts
Invite up to 3 collaborators:Tag Users in Photos
Post to Multiple Platforms at Once
The real power of a unified API - post to Instagram AND other platforms simultaneously:Why Use bundle.social Instead of Direct Instagram API?
| Challenge | Direct Instagram API | bundle.social API |
|---|---|---|
| Setup Time | 60+ hours | 5 minutes |
| App Review | Weeks (with screen recordings) | Not required |
| Container Polling | You implement it | We handle it |
| Media Validation | You build it | Automatic |
| Token Refresh | You maintain it | Automatic |
| Carousel Handling | Complex multi-container flow | Just pass multiple uploadIds |
| Multi-platform | Separate integrations | One API for 14+ platforms |
| Account Limits | N/A | None - connect unlimited accounts |
Error Handling We’ve Solved
Instagram’s API has… quirks. Here’s what we handle automatically:- “Media not ready” errors - Retry with exponential backoff
- Activity restrictions - Graceful handling of temporary blocks
- Transient 500/503 errors - Automatic retries
- Rate limits - Built-in throttling
- Token expiration - Automatic refresh
Getting Started
Ready to skip the Instagram API headaches?- Sign up at bundle.social
- Get your API key from the dashboard
- Connect your Instagram account (via Facebook or Instagram Direct)
- Start posting with our API
Instagram Platform Docs
Full Instagram API options and examples
API Documentation
Complete API reference
GitHub Examples
Ready-to-use code samples
Node.js SDK
TypeScript SDK for faster development