Publit.Si
Docs›Connect Instagram

Platforms

Connect Instagram

You create your own small app at Meta. It stays in Development mode: only you use it, so Meta doesn't need to review it. Publit.Si then posts with your own keys.

You need

  • A Cloudflare tunnel
  • An Instagram account you can switch to Professional
  • A Meta (Facebook) login for developers.facebook.com and business.facebook.com

Make the account Professional

  1. In the Instagram app: Settings → Account type and tools → Switch to professional account (Creator or Business). Posting through the API only works for professional accounts.

New Meta app

Add the account to a business portfolio

  1. Open business.facebook.com and create a business portfolio, or use yours.

  2. Settings → Accounts → Instagram accounts → Add → sign in to your Instagram account.

New Meta app

Create the Meta app

  1. Open developers.facebook.com → Create app.

    Meta for Developers, Create app: the use case Manage messaging & content on Instagram ticked
    1. 1:Manage messaging & content on Instagram
    Create app → use case Manage messaging & content on Instagram.
  2. Use case: Manage messaging & content on Instagram, and connect the business portfolio from the step before. The app can stay in Development mode.

  3. Use cases → Customize → API setup with Unified login.

New Meta app

Create the login configuration

  1. Facebook Login for Business → Configurations → create one from the template Instagram API (Unified Login).

  2. Token: System-user access token, expiration Never. Asset: Instagram accounts.

  3. Permissions: keep the ones in the table below. Remove ad accounts and the ads and messages permissions – Publit.Si needs none.

  4. A permission isn't offered? Add it to the use case first: Use cases → Manage messaging & content on Instagram → Customize → Permissions and features → Add next to it. Then open the configuration again and tick it.

PermissionNeeded?What it does
instagram_content_publishRequiredPosting. Publit.Si refuses the connection without it.
instagram_basicRequiredMeta grants publishing only together with it
instagram_manage_insightsOptionalViews and reach (INSTAGRAM_INSIGHTS=1)
instagram_manage_commentsOptionalReading and answering comments (INSTAGRAM_COMMENTS=1)
business_managementOptionalLets Publit.Si find the shared account by itself; without it you often need the account ID (next part)
New Meta app

Set the redirect URI

  1. In Publit.Si, open Settings › Platform setup › Instagram and copy the redirect URI. It looks like https://publish.example.com/oauth/instagram/callback.

    Publit.Si Settings, Platform setup: a card per platform with checks, a status badge and the redirect URI to copy
    1. 1:Status of the platform
    2. 2:Redirect URI to copy
    Settings › Platform setup: what's set for each platform and the exact redirect URI to copy.
  2. Meta: Facebook Login for Business → Settings → Valid OAuth Redirect URIs → paste it → Save changes.

New Meta app

Enter the keys

  1. Copy the App ID and the App secret from App settings → Basic, and the ID of the configuration from the step before.

  2. Enter them in Publit.Si under Settings › Platform setup › Enter credentials, or in .env:

    INSTAGRAM_UNIFIED_APP_ID=…
    INSTAGRAM_UNIFIED_APP_SECRET=…
    INSTAGRAM_UNIFIED_CONFIG_ID=…
    INSTAGRAM_INSIGHTS=1
    INSTAGRAM_COMMENTS=1
    Enter credentials form in Publit.Si with the Google client ID filled in and the secret field empty
    1. 1:Client ID
    2. 2:Save and apply
    Enter credentials writes the keys into .env for you and restarts the services. Secrets are never shown again.
New Meta app

If Meta doesn't name the account

With a system-user token Meta often doesn't tell which Instagram account you shared. Publit.Si then says so when you connect. Give it the account's ID once:

  1. Meta Business Suite → Settings → Accounts → Instagram accounts → your account: copy its ID (digits only).

  2. Set it in .env, restart and connect again. Publit.Si checks the ID against your login.

    INSTAGRAM_UNIFIED_ACCOUNT_ID=17841400000000000
Older Meta app

Older app: API setup with Instagram login

  1. In your app: Use cases → Customize → API setup with Instagram login. Only apps created before late October 2026 have it.

  2. Add these permissions: instagram_business_basic and instagram_business_content_publish. For views and reach also instagram_business_manage_insights, to read comments in Publit.Si instagram_business_manage_comments.

    Customize use case, Instagram API: API setup with Instagram login, the Instagram app ID, the hidden app secret and the permissions
    1. 1:API setup with Instagram login
    2. 2:Instagram app ID
    3. 3:App secret (Show)
    4. 4:Permissions
    API setup with Instagram login: the Instagram app ID, the secret behind Show, and the permissions. Only apps created before late October 2026 have it; newer apps use Unified login. Some menus may show in your browser's language.
Older Meta app

Add yourself as a tester

  1. App roles → Roles → Add People → Instagram Tester → enter your Instagram username. Testers then show in the All roles list.

    App roles, Roles: All roles table with Instagram Tester rows and the Add People button
    1. 1:App roles › Roles
    2. 2:Add People
    3. 3:Instagram Tester
    App roles → Roles → Add People → Instagram Tester: invite your account.
  2. Accept the invitation in Instagram: Settings → Website permissions → Apps and websites → Tester Invites → Accept. On the web it's at instagram.com/accounts/manage_access.

    Instagram settings, Apps and websites, the Tester Invites tab with the Publit.Si app
    1. 1:Tester Invites
    2. 2:Your app
    Instagram → Apps and websites → Tester Invites → accept. Afterwards it shows as authorized, like here.
Older Meta app

Set the redirect URI

  1. Copy the redirect URI from Publit.Si, Settings › Platform setup › Instagram.

  2. Meta: on API setup with Instagram login, step Set up Instagram business login → Business login settings → OAuth redirect URIs → paste it → Save.

    Business login settings dialog with the OAuth redirect URI of the tunnel filled in
    1. 1:OAuth redirect URIs
    2. 2:Save
    Business login settings → OAuth redirect URIs: paste the redirect URI from Publit.Si → Save.
Older Meta app

Enter the keys

  1. Copy the Instagram app ID and the Instagram app secret (behind Show) from API setup with Instagram login. Not the Facebook app ID at the top of the page.

  2. Enter them in Publit.Si under Settings › Platform setup › Enter credentials, or in .env. Leave the INSTAGRAM_UNIFIED_* settings empty – once one is set, Publit.Si uses Unified login.

    INSTAGRAM_APP_ID=…
    INSTAGRAM_APP_SECRET=…
    INSTAGRAM_INSIGHTS=1   # if you added the insights permission
    INSTAGRAM_COMMENTS=1   # if you added the comments permission

Check

Settings › Platform setup › Instagram shows every item as set – the guide there follows your .env (Unified login or the older way). When you publish your first post, the connection shows your account.

Troubleshooting

redirect_uri_mismatch
The redirect URI in the dashboard must match exactly, including http/https and port.
Instagram: "Insufficient developer role"
The account hasn't accepted the tester invitation, or Chrome is signed in to another account.
Instagram: "Invalid scope"
Old way (4b): a permission from step 4b.3 is missing. Switch off Instagram: views and reach under Settings › Platforms › Statistics and comments (or set INSTAGRAM_INSIGHTS=0 and restart), then reconnect.
Meta: "API setup with Instagram login is not available for newer apps"
Your app is new. Set it up with Unified login (step 4a).
Instagram: "Invalid platform app" or "Invalid Scopes"
The login still went the old way with a new app. Set INSTAGRAM_UNIFIED_APP_ID, INSTAGRAM_UNIFIED_APP_SECRET and INSTAGRAM_UNIFIED_CONFIG_ID (step 4a.6), restart and connect again.
Instagram: "Meta did not say which Instagram account you shared"
Set INSTAGRAM_UNIFIED_ACCOUNT_ID to the account's ID (step 4a.7), restart and connect again. Or add the optional permission business_management (step 4a.4), then Publit.Si can usually find the account itself.
Instagram: "… is not reachable with this login"
The ID in INSTAGRAM_UNIFIED_ACCOUNT_ID is wrong, or you didn't choose that account in Meta's dialog. Check the ID in Meta Business Suite → Settings → Instagram accounts.
Instagram: "publishing permission is missing"
Unified login (4a): instagram_content_publish isn't in your login configuration, or it was unticked in Meta's dialog. Not offered in the configuration? Add it under Use cases → Manage messaging & content on Instagram → Customize → Permissions and features first (step 4a.4). Then connect again and allow all.
Meta's configuration template wants to create an ad account
Remove ad accounts and the ads permissions from the configuration (step 4a.4). Publit.Si needs none.
Instagram can't load media
Bot Fight Mode is still on for the tunnel host.

Stuck? Search the troubleshooting list or write to us . Leave out secrets and tokens.