Unable to Connect Facebook Lead Ads Account

I’m trying to connect Facebook Login / Facebook API with n8n, but I’m facing issues getting the correct Client ID (App ID) and Client Secret (App Secret) from Meta for Developers.

Here’s what I’ve done so far:

  1. Created an app from https://developers.facebook.com/

  2. Selected app type (Consumer/Business)

  3. Got the App ID and App Secret from Dashboard

  4. Added Facebook Login product

  5. Configured OAuth Redirect URL and App Domains

But when I try to use these credentials inside n8n (Facebook OAuth2), it’s not working properly.

Is there any additional configuration needed?
Do I need to switch the app to Live mode?
Or configure anything specific for n8n redirect URL?

Would really appreciate any guidance. Thanks in advance! :folded_hands:

Workflow:

1 Like

Hi @devcodejourneyy
I guess you have already tried using meta app with facebook business credentials to login, this might be a credential related problem but let’s consider OAuth scopes also pages_manage_metadata , and setting Redirect url given in the n8n credentials as is in the valid oauth redirect in the meta app and then try to switch to live and then connect facebook lead ads oath to n8n

I’ve been trying to connect my Facebook Lead Ads account with n8n for the last 3–4 hours, but I’m still facing the same issue.

I have already:

  • Configured valid OAuth Redirect URL

  • Added the required OAuth scopes

  • Used the correct App ID (Client ID) and App Secret

  • Checked app permissions and settings

But the connection still isn’t working.

The most interesting thing is — no one has worked on this workflow or published any results!

Hi @devcodejourneyy

here are things you can check:

  1. go to your Meta Dashboard > Facebook Login > Settings. make sure the ‘Valid OAuth Redirect URIs’ box exactly matches https://n8.spagreen.net/rest/oauth2-credential/callback. if there’s even a single extra space or a trailing slash, Meta blocks it silently.

  2. you don’t strictly need to switch to Live mode. but if your app is in Development mode, the personal Facebook account you are using to log in must be explicitly added as an Admin, Developer, or Tester under the App Roles section in Meta.

  3. go to business.facebook.com > Integrations > Leads Access. you have to explicitly assign your Meta App and your Facebook profile permission to pull leads for that specific Page.

  4. make sure your app is requesting pages_manage_metadata, pages_show_list, pages_read_engagement, and lead_retrieval.

what exactly happens when you click “Connect my account”? does a Facebook popup window crash with a specific error code, or does it just fail silently?

Hey, for Facebook Lead Ads to actually work you need to switch the app to Live mode, Meta blocks OAuth connections for apps still in Development unless the user is explicitly added as a tester/admin on the app. To go Live you’ll need to add a Privacy Policy URL in App Settings > Basic, then flip the toggle at the top of the dashboard. Also double check you have Advanced Access for public_profile under App Review > Permissions and Features, the basic access isn’t enough for the leads_retrieval stuff. One more thing — is your n8n instance publicly accessible over HTTPS? Meta won’t accept localhost or self-signed certs for the callback URL.