Meta App Setup Guide
Complete step-by-step guide to create your Meta Developer App, configure permissions, and set up webhooks for Content Engineer.
Before you start:
You need a Facebook account with a verified Business Manager or a Facebook Page with admin access.
Go to Meta Developer Console
Visit developers.facebook.com/apps
Click "Create App" → Select "Business" as app type
Fill in App Details
App Name: Content Engineer (or your branded name)
App Contact Email: Your business email
Business Account: Link your Facebook Business Manager
Get Your App Credentials
Go to App Settings → Basic
Copy your App ID and App Secret and add to your .env.local:
META_APP_ID=your_app_id_hereMETA_APP_SECRET=your_app_secret_hereAdd Privacy Policy and Terms URLs
In App Settings → Basic, add these required URLs:
Privacy Policy URL: https://your-domain.com/privacyTerms of Service URL: https://your-domain.com/terms⚠️ Without these URLs, your app cannot go live.
In your Meta app dashboard, click "Add Use Case" and add ALL of these:
💡 Note about your screenshot:
You already have "Engage with customers on Messenger", "Manage messaging & content on Instagram", and "Manage everything on your Page" checked — that's correct! Also add "Authenticate and request data from Instagram".
Each permission needs to be added in your app's use case configuration. Some require App Review.
| Permission | Enables | App Review? | Business Verification? |
|---|---|---|---|
| instagram_basic | OAuth Login + Profile Info | No | No |
| instagram_manage_insights | Full Analytics (reach, impressions, demographics) | Yes | No |
| instagram_content_publish | Post Scheduling | Yes | No |
| instagram_manage_messages | DM Automation | Yes | Required |
| instagram_manage_comments | Comment Automation | Yes | Required |
| pages_show_list | List Facebook Pages | No | No |
| pages_read_engagement | Facebook Page Analytics | Yes | No |
| pages_manage_posts | Facebook Post Scheduling | Yes | No |
| pages_messaging | Facebook Messenger Automation | Yes | Required |
| pages_manage_engagement | Facebook Comment Automation | Yes | Required |
| youtube.readonly | YouTube Analytics | No | No |
| youtube.upload | YouTube Video Scheduling | Yes | No |
Go to App Dashboard → Webhooks
In your Meta app, go to Products → Webhooks
Click "Subscribe to this object" for both Instagram and Page
Set Callback URL and Verify Token
Callback URL:
https://your-domain.com/api/webhooks/metaVerify Token: (create a random string)
META_WEBHOOK_VERIFY_TOKEN=your-random-verify-tokenAdd this to your .env.local as shown above.
Subscribe to Required Fields
For Instagram, subscribe to:
messagescommentsmentionsstory_insightsFor Page, subscribe to:
messagescommentsfeedmention⚠️ Required by Meta — your app will be rejected without these
Privacy Policy URL
Add to Meta app settings
https://your-domain.com/privacyTerms of Service URL
Add to Meta app settings
https://your-domain.com/termsData Deletion Callback URL
REQUIRED — deletes user data on request
https://your-domain.com/api/webhooks/data-deletionDeauthorize Callback URL
Called when user disconnects app
https://your-domain.com/api/webhooks/deauthorizeApp Icon (1024×1024)
Upload in Meta app dashboard
Business Verification
Required for messaging permissions
Opt-out mechanism in all DMs
Already built into DM automation (Reply STOP)
24-hour messaging window respected
Enforced in automation webhook handler
Switch App to Live Mode first
Toggle your app from Development → Live mode before submitting.
In dev mode, only 5 test users can use the app.
Prepare screen recordings
Meta requires a screen recording for each advanced permission showing:
- How the user grants the permission
- How your app uses the data
- That you're not scraping or storing data beyond what's needed
Submit each permission separately
In your app dashboard, go to App Review → Permissions and Features
Request each permission one by one with justification and recording.
Timeline
Basic permissions: 1–3 business days
Messaging permissions: 5–10 business days + Business Verification
Create Google Cloud Project
Visit console.cloud.google.com
Create a new project → Name it "Content Engineer"
Enable Required APIs
Go to APIs & Services → Library and enable:
YouTube Data API v3YouTube Analytics APICreate OAuth 2.0 Credentials
Go to APIs & Services → Credentials → Create Credentials → OAuth Client ID
Application type: Web application
Authorized redirect URIs:
https://your-domain.com/api/auth/youtube/callbackCopy Client ID and Client Secret to .env.local
All required environment variables for the platform:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
SUPABASE_SERVICE_ROLE_KEY=eyJ...
# Razorpay
NEXT_PUBLIC_RAZORPAY_KEY_ID=rzp_live_xxx
RAZORPAY_KEY_SECRET=xxx
RAZORPAY_WEBHOOK_SECRET=xxx
# Meta
META_APP_ID=your_meta_app_id
META_APP_SECRET=your_meta_app_secret
META_WEBHOOK_VERIFY_TOKEN=random_string
NEXT_PUBLIC_APP_URL=https://your-domain.com
# Google / YouTube
GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-xxx
# Render Worker
RENDER_WORKER_URL=https://your-worker.onrender.com
RENDER_WORKER_SECRET=random_secret