Facebook Graph API credentials
You can use these credentials to authenticate the following nodes:
Facebook Trigger credentials
If you want to create credentials for the Facebook Trigger node, follow the instructions mentioned in the Facebook App credentials documentation.
Supported authentication methods
OAuth2
App access token
Related resources
Refer to Meta's Graph API documentation for more information about the service.
Prerequisites
Regardless of the authentication method you choose, you'll need a Meta for Developers account and a Meta app.
Create a Meta app
To create a Meta app:
Go to the Meta Developer App Dashboard and select Create App.
Complete the app details:
Add an App name.
Add an App contact email.
Select the Use case that aligns with how you wish to use the Facebook Graph API. For products in Meta's Business suite (like Messenger, Instagram, WhatsApp, Marketing API, App Events, Audience Network, Commerce API, Fundraisers, Jobs, Threat Exchange, and Webhooks), select Other, then select Next.
For App type, select Business and Next.
If you have a business portfolio and you're ready to connect the app to it, select the business portfolio. If you don't have a business portfolio or you're not ready to connect the app to the portfolio, leave it at No business portfolio selected.
Select Create app.
The Add products to your app page opens. Select the products that make sense for your app.
Facebook Login for Business
If you're going to use the OAuth2 authentication type, you must add Facebook Login for Business. You don't need this product if you're only using an app access token.
Refer to Meta's Create an app documentation for more information on creating an app, required fields like the Privacy Policy URL, and adding products.
Taking a Meta app live
When to take your app Live
In Development mode, only people with a role on the app (Administrator, Developer, or Tester) can authenticate or generate tokens. If you're only connecting your own account, you can leave the app in Development mode.
Select App settings > Basic from the left menu.
Enter a Privacy Policy URL. (Required before you can take the app Live.)
Select Save changes.
If you need users without a role on the app to authenticate, toggle the App Mode from Development to Live.
For more information on the app modes and switching to Live mode, refer to App Modes and Publish | App Types.
Using OAuth2
To configure this credential, you'll need a Meta for Developers account and:
A Client ID
A Client Secret
There are two steps in setting up your credential:
Create a Meta app with the products you need to access.
Generate a Client ID and Client Secret for that app.
Generate a Client ID and Client Secret
Generate a Client ID and Client Secret to use with your n8n credential and the products you selected:
Go to the Meta Developer App Dashboard.
Select the Meta App you created in the top left dropdown.
In the left menu, select Products > Facebook Login for Business > Settings.
Copy the OAuth Redirect URL from your n8n credential into the Valid OAuth Redirect URIs box, then Save changes.
In the left menu, select App settings > Basic.
Copy the App ID and enter it in your n8n credential as the Client ID.
Copy the App Secret and enter it in your n8n credential as the Client Secret.
In your n8n credential, select Connect to Facebook Graph (App).
Refer to Meta's Facebook Login for Business documentation for more information.
Using app access token
To configure this credential, you'll need a Meta for Developers account and:
An app Access Token
There are two steps in setting up your credential:
Create a Meta app with the products you need to access.
Generate an App Access Token for that app.
Generate an App Access Token
Create an app access token to use with your n8n credential and the products you selected:
Open the Graph API explorer.
Select the Meta App you created in the Access Token section.
In User or Page, select Get App Token.
Select Generate Access Token.
The page prompts you to log in and grant access. Follow the on-screen prompts.
App unavailable
You may receive a warning that the app isn't available. Once you take an app live, there may be a few minutes' delay before you can generate an access token.
Copy the token and enter it in your n8n credential as the Access Token.
Refer to the Meta instructions for Your First Request for more information on generating the token.
Last updated
Was this helpful?