Instagram API Setup Guide
This guide will help you configure your Instagram app for Feedframer integration.
Prerequisites
- A Facebook Developer account
- An Instagram Business or Creator account
- Access to Meta Developers Portal
Step 1: Create a Meta App
- Go to Meta Developers Portal
- Click My Apps → Create App
- Select Consumer as the app type
- Fill in app details:
- App Name: Feedframer (or your preferred name)
- App Contact Email: Your email address
- Click Create App
Step 2: Add Instagram Basic Display
- In your app dashboard, scroll to Add Products
- Find Instagram Basic Display and click Set Up
- Click Create New App under Instagram App ID
- Fill in the required details:
- Display Name: Feedframer
- Valid OAuth Redirect URIs:
- Local:
http://localhost:8000/instagram/callback - Production:
https://your-domain.com/instagram/callback
- Local:
- Deauthorize Callback URL:
https://your-domain.com/instagram/deauthorize - Data Deletion Request URL:
https://your-domain.com/instagram/data-deletion
- Click Save Changes
Step 3: Configure App Settings
Get Your Credentials
- Go to Basic Display → Basic Display Settings
- Copy the following values:
- Instagram App ID → This is your
INSTAGRAM_CLIENT_ID - Instagram App Secret → This is your
INSTAGRAM_CLIENT_SECRET
- Instagram App ID → This is your
Add to Environment Variables
Add these to your .env file:
INSTAGRAM_CLIENT_ID=your_app_id_here
INSTAGRAM_CLIENT_SECRET=your_app_secret_here
INSTAGRAM_REDIRECT_URI="${APP_URL}/instagram/callback"
Step 4: Add Test Users (Development)
During development, you need to add Instagram test users:
- Go to Basic Display → User Token Generator
- Click Add or Remove Instagram Testers
- Add your Instagram username
- Accept the invitation in your Instagram app:
- Go to Instagram → Settings → Apps and Websites
- Under Tester Invites, accept the invitation
Step 5: Required Permissions (Scopes)
Feedframer requires the following Instagram permissions:
instagram_basic- Read basic profile info and mediainstagram_content_publish- (Optional) Future feature support
These scopes are configured in config/instagram.php and requested automatically during OAuth.
Step 6: Switch to Live Mode
Once ready for production:
- Complete App Review in Meta Developer Portal
- Submit for review with explanation of how you use Instagram data
- Once approved, switch from Development to Live mode
- Update redirect URIs to production URLs
API Limitations
Development Mode
- Limited to test users only
- Maximum 25 test users
- Token refresh available
Live Mode
- Available to all Instagram Business/Creator accounts
- Rate limits apply: 200 requests per hour (per user token)
- Tokens expire after 60 days (auto-refreshed by Feedframer)
Troubleshooting
Error: "Redirect URI Mismatch"
- Ensure
INSTAGRAM_REDIRECT_URIin.envexactly matches the URI in Meta Developer Portal - Check for trailing slashes - they must match exactly
- For local development, use
http://localhost:8000(no HTTPS)
Error: "Invalid Client ID"
- Double-check
INSTAGRAM_CLIENT_IDin.envmatches the Instagram App ID - Ensure you're using Instagram App ID, not Facebook App ID
Error: "App Not Live"
- Add your Instagram account as a tester (see Step 4)
- Or submit for app review to go live
Tokens Expiring
- Feedframer automatically refreshes tokens before they expire
- Tokens are refreshed 7 days before expiration
- Check logs if refresh fails:
storage/logs/laravel.log
Data Structure
Instagram API returns the following data for media:
{
"id": "instagram_media_id",
"media_type": "IMAGE|VIDEO|CAROUSEL_ALBUM",
"media_url": "https://...",
"thumbnail_url": "https://...",
"permalink": "https://www.instagram.com/p/...",
"caption": "Post caption text",
"timestamp": "2025-01-01T00:00:00+0000",
"like_count": 100,
"comments_count": 50
}
Useful Links
- Meta Developers Portal
- Instagram Basic Display API Documentation
- Instagram Graph API Documentation
- Meta App Review Process
Support
For issues specific to:
- Meta/Instagram API: Check Meta Developer Community
- Feedframer: Open an issue on GitHub or contact support
Last Updated: October 2025