Instagram Publishing

Learn how to connect Instagram Business accounts and publish photos, carousels, and Reels.

Connecting Instagram Account

Prerequisites

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:

  1. Open Instagram app
  2. Go to Settings β†’ Account
  3. Tap Switch to Professional Account
  4. Choose Business or Creator
  5. Follow the setup steps

Connection Steps

  1. Click the "Connect Instagram" button on the dashboard
  2. Log in to Instagram (if not already logged in)
  3. Authorize Boring to access your Instagram account
  4. Grant the required permissions:
    • instagram_business_basic - Basic account information
    • instagram_business_content_publish - Publish content
    • instagram_business_manage_comments - Manage comments
    • instagram_business_manage_messages - Manage direct messages
  5. Click "Authorize"

Your Instagram account will appear in the Authorized Accounts list with:

Token Information

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:

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:

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:

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:

Recommended:

Video Specifications

Reels requirements:

Hosting Your Media

Same as Facebook - media URLs must be:

Test URL before publishing:

curl -I https://example.com/image.jpg
# Should return: content-type: image/jpeg

Caption Guidelines

Best Practices

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"

Error: "Media processing failed"

Error: "Video upload failed"

Error: "Token expired"

Error: "Carousel items must have same aspect ratio"

Publishing Status

Instagram posts go through stages:

  1. Creating container - API receives request
  2. Uploading media - Media is uploaded to Instagram
  3. Processing - Instagram processes the media (especially videos)
  4. 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

2. Caption Strategy

3. Content Types

4. Timing

5. Testing

Publishing History

View your Instagram posts in the dashboard:

  1. Sign in to Boring Dashboard
  2. Scroll to "Recent Posts" section
  3. Filter by Instagram platform

Each entry shows:

Rate Limits

Instagram API rate limits:

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