Articles in this section
Category / Section

How to Get Instagram App Credentials (Client ID & Secret)

Updated:

Prerequisites

  • A Facebook account
  • An Instagram Business or Creator account (not personal)
  • Your Instagram account must be connected to a Facebook Page

Step 1: Create a Facebook Developer Account

  1. Go to developers.facebook.com
  2. Click “Get Started” or “Log In” (top right)
  3. Log in with your Facebook account
  4. Accept the Facebook Developer terms

Step 2: Create a New App

  1. Click “My Apps” (top right) → “Create App”
  2. Select use case: “Other” → Click “Next”
  3. Select app type: “Business” → Click “Next”
  4. Fill in app details:
    • App Name: e.g., “My Instagram Integration”
    • App Contact Email: Your email
    • Business Account: Select or create one
  5. Click “Create App”

Step 3: Add Instagram Graph API Product

  1. In your app dashboard, scroll to “Add products to your app”
  2. Find “Instagram Graph API” → Click “Set Up”
  3. This adds Instagram capabilities to your app

Step 4: Configure OAuth Settings

  1. Go to App SettingsBasic (left sidebar)
  2. Note your:
    • App ID (this is your Client ID)
    • App Secret (click “Show” to reveal - this is your Client Secret)
  3. Scroll down to “Add Platform”:
    • Click “+ Add Platform” → Select “Website”
    • Enter your site URL: https://your-site.com
  4. In “App Domains”: Add your domain (e.g., your-site.com)
  5. Click “Save Changes”

Step 5: Add OAuth Redirect URI

⚠️ Important: You MUST use your site’s REST API endpoint as the redirect URI, NOT the default FlowMattic proxy URL. The redirect URI shown below is specific to YOUR website.

  1. Go to Facebook LoginSettings (left sidebar)

    • If not visible, go to Products → Add Product → Facebook Login → Set Up
  2. In “Valid OAuth Redirect URIs”, add your site’s Instagram OAuth endpoint:

    https://your-site.com/wp-json/flowmattic/v1/auth/instagram
    

    (Replace your-site.com with your actual domain)

    Example: If your site is mysite.flowmattic.com, use:

    https://mysite.flowmattic.com/wp-json/flowmattic/v1/auth/instagram
    
  3. Click “Save Changes”


Step 6: Request Permissions (For Live Mode)

  1. Go to App ReviewPermissions and Features
  2. Request these permissions:
    • instagram_basic
    • instagram_content_publish
    • instagram_manage_comments
    • instagram_manage_insights
    • pages_show_list
    • pages_read_engagement
    • business_management

Note: For testing, you can use Development Mode without approval. Only your account (and app admins/testers) can authenticate.


Step 7: Add Test Users (Development Mode)

  1. Go to App RolesRoles (left sidebar)
  2. Under “Testers”, click “Add Testers”
  3. Enter the Facebook username of anyone who needs to test
  4. They must accept the invitation from their Facebook settings

Step 8: Connect Instagram to Facebook Page

Before authenticating, ensure your Instagram is properly connected:

  1. Open Instagram AppSettingsAccountSharing to other apps
  2. Select Facebook and link to your Facebook Page
  3. OR on Facebook: Go to your Page SettingsInstagramConnect Account

Step 9: Use Credentials in FlowMattic

  1. In FlowMattic, go to ConnectsAdd New
  2. Search for “Instagram”
  3. Enter:
    • Client ID: Your Facebook App ID
    • Client Secret: Your Facebook App Secret
  4. Click Connect to authenticate

Troubleshooting

Issue Solution
“App not authorized” Add yourself as a Tester in App Roles
“Invalid redirect URI” Ensure the redirect URI matches exactly (including https://)
“No redirect URI in the params” For local sites (.local domain): Use ngrok and set up the redirect URI filter (see above). For live sites: Ensure the URI in Facebook matches your site’s REST endpoint exactly.
“No Instagram accounts found” Connect your Instagram to a Facebook Page first
“Permissions denied” Request permissions in App Review (for live mode)
Connection popup closes immediately Check that your Facebook App has “Facebook Login” product added and configured

Quick Reference

Setting Where to Find
Client ID App Settings → Basic → App ID
Client Secret App Settings → Basic → App Secret
Redirect URI https://your-site.com/wp-json/flowmattic/v1/auth/instagram
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied