Facebook App credentials#
You can use these credentials to authenticate the following nodes:
Facebook Graph API credentials
If you want to create credentials for the Facebook Graph API node, follow the instructions in the Facebook Graph API credentials documentation.
Supported authentication methods#
- App access token
Related resources#
Refer to Meta's Graph API documentation for more information about the service.
Using app access token#
To configure this credential, you'll need a Meta for Developers account and:
- An app Access Token
- An optional App Secret: Used to verify the integrity and origin of the payload.
There are five steps in setting up your credential:
- Create a Meta app with the Webhooks product.
- Generate an App Access Token for that app.
- Configure the Facebook trigger.
- Optional: Add an app secret.
- App Review: Only required if your app's users don't have roles on the app itself. If you're creating the app for your own internal purposes, this isn't necessary.
Refer to the detailed instructions below for each step.
Create a Meta app#
To create a Meta app:
- Go to the Meta Developer App Dashboard and select Create App.
- 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, select I don’t want to connect a business portfolio yet and select Next. The Use cases page opens.
- Select Other, then select Next.
- Select Business and Next.
- Complete the essential information:
- Add an App name.
- Add an App contact email.
- Here again you can connect to a business portfolio or skip it.
- Select Create app.
- The Add products to your app page opens.
- Select App settings > Basic from the left menu.
- Enter a Privacy Policy URL. (Required to take the app "Live.")
- Select Save changes.
- At the top of the page, toggle the App Mode from Development to Live.
- In the left menu, select Add Product.
- The Add products to your app page appears. Select Webhooks.
- The Webhooks product opens.
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.
For more information on the app modes and switching to Live mode, refer to App Modes and Publish | App Types.
Generate an App Access Token#
Next, create an app access token to be used by your n8n credential and the Webhooks product:
- In a separate tab or window, open the Graph API explorer.
- Select the Meta App you just 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. Save this token somewhere else, too, since you'll need it for the Webhooks configuration.
- Save your n8n credential.
Refer to the Meta instructions for Your First Request for more information on generating the token.
Configure the Facebook Trigger#
Now that you have a token, you can configure the Facebook Trigger node:
- In your Meta app, copy the App ID from the top navigation bar.
- In n8n, open your Facebook Trigger node.
- Paste the App ID into the APP ID field.
- Select Test step to shift the trigger into listening mode.
- Return to the tab or window where your Meta app's Webhooks product configuration is open.
- Subscribe to the objects you want to receive Facebook Trigger notifications about. For each subscription:
- Copy the Webhook URL from n8n and enter it as the Callback URL in your Meta App.
- Enter the Access Token you copied above as the Verify token.
- Select Verify and save. (This step fails if you don't have your n8n trigger listening.)
- Some webhook subscriptions, like User, prompt you to subscribe to individual events. Subscribe to the events you're interested in.
- You can send some Test events from Meta to confirm things are working. If you send a test event, verify its receipt in n8n.
Refer to the Facebook Trigger node documentation for more information.
Optional: Add an App Secret#
For added security, Meta recommends adding an App Secret. This signs all API calls with the appsecret_proof
parameter. The app secret proof is a sha256 hash of your access token, using your app secret as the key.
To generate an App Secret:
- In Meta while viewing your app, select App settings > Basic from the left menu.
- Select Show next to the App secret field.
- The page prompts you to re-enter your Facebook account credentials. Once you do so, Meta shows the App Secret.
- Highlight it to select it, copy it, and paste this into your n8n credential as the App Secret.
- Save your n8n credential.
Refer to the App Secret documentation for more information.
App review#
App Review requires Business Verification.
Your app must go through App Review if it will be used by someone who:
- Doesn't have a role on the app itself.
- Doesn't have a role in the Business that has claimed the app.
If your only app users are users who have a role on the app itself, App Review isn't required.
As part of the App Review process, you may need to request advanced access for your webhook subscriptions.
Refer to Meta's App Review and Advanced Access documentation for more information.
Common issues#
Unverified apps limit#
Facebook only lets you have a developer or administrator role on a maximum of 15 apps that aren't already linked to a Meta Verified Business Account.
Refer to Limitations | Create an app if you're over that limit.