Instagram Publishing
Learn how to connect Instagram Business accounts and publish photos, carousels, and Reels.
Connecting Instagram Account
Prerequisites
- An Instagram Business or Creator account (Personal accounts not supported)
- Signed in to Boring Dashboard
Note: Unlike Facebook integration, Instagram connection uses native Instagram OAuth and does not require a Facebook Page.
How to Convert to Business Account
If you have a personal Instagram account:
- Open Instagram app
- Go to Settings β Account
- Tap Switch to Professional Account
- Choose Business or Creator
- Follow the setup steps
Connection Steps
- Click the "Connect Instagram" button on the dashboard
- Log in to Instagram (if not already logged in)
- Authorize Boring to access your Instagram account
- Grant the required permissions:
instagram_business_basic- Basic account informationinstagram_business_content_publish- Publish contentinstagram_business_manage_comments- Manage commentsinstagram_business_manage_messages- Manage direct messages
- Click "Authorize"
Your Instagram account will appear in the Authorized Accounts list with:
- Instagram username (e.g., @yourusername)
- Account type (BUSINESS, CREATOR, or MEDIA_CREATOR)
- Platform badge (Instagram)
- Unique Account ID (click "Copy ID")
- Disconnect option
Token Information
- Token Type: Long-lived User Access Token
- Initial token: 1 hour (short-lived)
- Converted to: 60 days (long-lived) automatically
- Expiration: 60 days from authorization
- Auto-refresh: Manual re-authorization required before expiry
Important: You'll need to reconnect your Instagram account every 60 days.
Supported Content Types
Instagram supports the following post types through Boring:
| Type | Description | Media Count | Example |
|---|---|---|---|
| Photo | Single image post | 1 | Product photo, lifestyle shot |
| Carousel | Multiple images | 2-10 | Photo series, before/after |
| Reels | Video content | 1 | Short video, tutorial |
Note: Instagram requires media for all posts. Text-only posts are not supported.
Publishing Examples
1. Single Photo Post
{
"post": {
"accountId": "your-instagram-account-id",
"content": {
"text": "Beautiful sunset π
#nature #photography",
"mediaUrls": ["https://example.com/sunset.jpg"],
"platform": "instagram"
},
"target": {
"targetType": "instagram"
}
}
}
Result: Single image post with caption on your Instagram feed.
Photo Requirements:
- Format: JPG, PNG
- Min resolution: 320x320
- Max resolution: 1440x1440
- Aspect ratio:
- Square: 1:1 (recommended)
- Landscape: 1.91:1
- Portrait: 4:5
- Max file size: 8MB
2. Carousel Post
{
"post": {
"accountId": "your-instagram-account-id",
"content": {
"text": "Swipe to see our new collection! β‘οΈ #fashion #newcollection",
"mediaUrls": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.jpg",
"https://example.com/photo3.jpg",
"https://example.com/photo4.jpg"
],
"platform": "instagram"
},
"target": {
"targetType": "instagram"
}
}
}
Result: Carousel post with multiple swipeable images.
Carousel Requirements:
- Min images: 2
- Max images: 10
- All images must have same aspect ratio
- Formats: JPG, PNG
- Same requirements as single photo
3. Reels (Video)
{
"post": {
"accountId": "your-instagram-account-id",
"content": {
"text": "Quick tutorial on how to use our product! π₯ #tutorial #howto",
"mediaUrls": ["https://example.com/tutorial.mp4"],
"platform": "instagram"
},
"target": {
"targetType": "instagram"
}
}
}
Result: Video published as an Instagram Reel.
Video Requirements:
- Format: MP4, MOV
- Codec: H.264
- Max duration: 90 seconds (Reels)
- Min duration: 3 seconds
- Aspect ratio: 9:16 (vertical) recommended
- Max file size: 100MB
- Frame rate: 30fps recommended
Note: Video publishing is asynchronous. Instagram processes the video in the background, which may take a few minutes.
API Request Format
Full Example (Python)
import requests
API_URL = "https://boring.aiagent-me.com/v2/posts"
API_KEY = "boring_xxxxxxxxxxxxx"
ACCOUNT_ID = "your-instagram-account-id"
# Carousel example
post_data = {
"post": {
"accountId": ACCOUNT_ID,
"content": {
"text": "Product showcase! Swipe for details β‘οΈ\n\n#products #shopping #newrelease",
"mediaUrls": [
"https://storage.example.com/product-main.jpg",
"https://storage.example.com/product-detail1.jpg",
"https://storage.example.com/product-detail2.jpg"
],
"platform": "instagram"
},
"target": {
"targetType": "instagram"
}
}
}
headers = {
"boring-api-key": API_KEY,
"Content-Type": "application/json"
}
response = requests.post(API_URL, headers=headers, json=post_data)
result = response.json()
if result["success"]:
print(f"Published! Media ID: {result['data']['media_id']}")
else:
print(f"Error: {result['message']}")
Success Response
{
"success": true,
"message": "Post published successfully",
"data": {
"media_id": "12345678901234567",
"post_type": "carousel",
"platform": "instagram",
"page_name": "your_username",
"item_count": 3,
"published_at": "2025-01-20T10:30:00Z"
}
}
Media URL Requirements
Image Specifications
Instagram is strict about image quality:
Minimum requirements:
- Resolution: 320x320 pixels
- File size: 1KB
Recommended:
- Resolution: 1080x1080 (square) or 1080x1350 (portrait)
- File size: 1-8MB
- Format: JPG (PNG works but may be converted)
- Color space: sRGB
Video Specifications
Reels requirements:
- Duration: 3-90 seconds
- Resolution: 1080x1920 (9:16 vertical)
- Format: MP4
- Codec: H.264
- Audio: AAC
- Bitrate: 3500-5000 kbps recommended
Hosting Your Media
Same as Facebook - media URLs must be:
- Publicly accessible
- Direct file URLs
- HTTPS protocol
- Valid and returning correct content-type
Test URL before publishing:
curl -I https://example.com/image.jpg
# Should return: content-type: image/jpeg
Caption Guidelines
Best Practices
- Max length: 2,200 characters
- Hashtags: 3-5 relevant hashtags (up to 30 allowed)
- Emojis: Encouraged for engagement
- Line breaks: Use
\n\nfor paragraph breaks - @mentions: Tag users or brands with @username
- First 125 characters: Most important (shown before "more")
Example Caption
caption = """Summer vibes are here! βοΈπ΄
Swipe to see our new beachwear collection β
Shop now: link in bio
#summer #beachwear #fashion #ootd #style
@partnerbrand"""
Troubleshooting
Common Errors
Error: "Account is not a Business account"
- Cause: Connected account is a personal account
- Solution: Convert to Business or Creator account in Instagram settings
Error: "Media processing failed"
- Cause: Image doesn't meet Instagram requirements
- Solution:
- Check minimum resolution (320x320)
- Verify aspect ratio is within limits
- Ensure file is valid JPG/PNG
Error: "Video upload failed"
- Cause: Video format or duration issue
- Solution:
- Convert to MP4 with H.264 codec
- Ensure duration is 3-90 seconds
- Check file size is under 100MB
Error: "Token expired"
- Cause: 60-day token has expired
- Solution: Reconnect Instagram account from dashboard
Error: "Carousel items must have same aspect ratio"
- Cause: Mixed aspect ratios in carousel
- Solution: Resize all images to same aspect ratio (e.g., all 1:1)
Publishing Status
Instagram posts go through stages:
- Creating container - API receives request
- Uploading media - Media is uploaded to Instagram
- Processing - Instagram processes the media (especially videos)
- Publishing - Post goes live on your feed
For Reels, processing can take 1-5 minutes. The API will wait and retry automatically.
Best Practices
1. Image Quality
- Use high-resolution images (1080x1080 minimum)
- Maintain consistent aspect ratio in carousels
- Optimize file size (1-3MB is ideal)
- Use JPG for photos, PNG for graphics with transparency
2. Caption Strategy
- Front-load important info (first 125 chars)
- Use line breaks for readability
- Include call-to-action
- Add 3-5 relevant hashtags
- Tag relevant accounts
3. Content Types
- Product photos: Use carousel to show multiple angles
- Tutorials: Use Reels for step-by-step videos
- Before/After: Use carousel for comparison
- Behind-the-scenes: Use Reels for authenticity
4. Timing
- Post during peak engagement times (check Instagram Insights)
- Consistency is key (regular posting schedule)
- Test different times to find what works for your audience
5. Testing
- Test with single photo first
- Verify all URLs are accessible
- Preview media before publishing
- Check aspect ratios match
Publishing History
View your Instagram posts in the dashboard:
- Sign in to Boring Dashboard
- Scroll to "Recent Posts" section
- Filter by Instagram platform
Each entry shows:
- Post type (photo, carousel, reels)
- Caption preview
- Status (published/failed)
- Media ID
- Timestamp
Rate Limits
Instagram API rate limits:
- Per user: 200 calls/hour
- Per app: 4800 calls/hour
Boring handles rate limiting and returns errors if limits are reached.
Advanced Features
Multiple Instagram Accounts
Connect multiple Instagram Business accounts:
accounts = {
"main_account": "account-id-1",
"personal_brand": "account-id-2",
"client_account": "account-id-3"
}
# Publish to specific account
for name, account_id in accounts.items():
post_data["post"]["accountId"] = account_id
response = requests.post(API_URL, headers=headers, json=post_data)
Content Adaptation
Adapt content from other platforms for Instagram:
def adapt_for_instagram(content):
# Instagram prefers square/vertical
# Optimize caption for Instagram style
return {
"text": f"{content['text']}\n\n#instagram #hashtag",
"mediaUrls": resize_for_instagram(content['mediaUrls']),
"platform": "instagram"
}
Carousel Planning
Plan carousel content strategically:
carousel_strategy = {
"slide_1": "Attention-grabbing main image",
"slide_2": "Problem statement",
"slide_3": "Solution preview",
"slide_4": "Product details",
"slide_5": "Call to action"
}
Instagram Shopping
Note: Instagram Shopping features (product tagging) are not currently supported by Boring API. This requires additional permissions and approval from Instagram.
Next Steps
- Facebook Publishing - Learn about Facebook
- Threads Publishing - Learn about Threads
- API Reference - Complete API documentation
- Examples - More code examples