FeedHorizon API
Platforms

Instagram

Instagram OAuth setup and SaaS provider checklist for FeedHorizon.

Overview

FeedHorizon supports Instagram publishing through the Instagram Content Publishing API. Connect your Instagram professional account via Business Login (OAuth), then publish single images, videos (as Reels), or carousels with up to 10 items.

Latest integration requirements (Meta)

Based on Meta's Instagram Platform docs:

  • Use Instagram API with Instagram Login for professional account OAuth.
  • For tech providers serving multiple businesses, Advanced Access + App Review is required.
  • Apps must use Instagram Login or Facebook Login for this integration path (not both in the same app flow).
  • Current Instagram Login scope values are:
    • instagram_business_basic
    • instagram_business_content_publish
    • instagram_business_manage_comments
    • instagram_business_manage_messages

Note: Meta docs sometimes reference permission labels with ..._publishing while OAuth scope value uses ..._content_publish. Use the scope names shown in the Business Login docs for authorization URLs.

OAuth flow used by FeedHorizon

  1. User clicks Connect on Instagram in Dashboard -> Connections.
  2. App redirects to /api/connect/instagram.
  3. User authorizes on Instagram and returns to /api/connect/instagram/callback.
  4. FeedHorizon exchanges code for a short-lived token, then for a long-lived token (60 days).
  5. Account is linked to:
    • user default profile, or
    • invite target profile when platformInvite state is present.

SaaS provider setup (Meta App Dashboard)

Use this checklist if you are onboarding Instagram as a multi-tenant SaaS provider:

  1. Create/select a Business app in Meta Developers.
  2. Add the Instagram product.
  3. In Instagram -> API setup with Instagram login -> Business login settings:
    • Copy Instagram App ID and App Secret.
    • Add OAuth redirect URI:
      • http://localhost:3000/api/connect/instagram/callback (local)
      • https://YOUR_DOMAIN/api/connect/instagram/callback (prod)
  4. Configure requested scopes (start minimal; request only what your features use).
  5. Set app mode and access:
    • Single business you own/manage -> Standard Access can be enough.
    • Multi-business SaaS -> request Advanced Access and complete App Review.
  6. Prepare App Review evidence:
    • test account credentials
    • clear reviewer instructions
    • screencast per requested permission
    • visible login button flow
    • privacy policy URL and app metadata
  7. If using webhooks later, configure Instagram webhook subscriptions and ensure required access/permissions.

Environment variables

Add these variables:

INSTAGRAM_CLIENT_ID=...
INSTAGRAM_CLIENT_SECRET=...
INSTAGRAM_REDIRECT_URI=http://localhost:3000/api/connect/instagram/callback
# Optional override; defaults to instagram_business_basic,instagram_business_content_publish
INSTAGRAM_SCOPE=instagram_business_basic,instagram_business_content_publish

Platform invites

Instagram invite links work the same as LinkedIn invites:

  • invite link is single-use and expires in 7 days
  • invitee signs in, then continues with Instagram OAuth
  • connected account is attached to inviter profile