Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Facebook Marketing

This documentation for the Facebook Marketing integration describes the technical capabilities of this integration, including authorization, scopes/permissions, and utilized endpoints. For more information on how to integrate Facebook Marketing, visit our connection instructions.

Version

This integration utilizes the Facebook Marketing Facebook Marketing API v22.0.

Base URL

The base URL used for all Facebook Marketing API endpoints:
https:​//graph.facebook.com/v22.0

Authentication & Authorization

The DataGrail Facebook Marketing integration connects using token authentication which requires an Access Token.

Sensitive Credentials
Publicly exposing your API credentials can allow unauthorized access to Facebook Marketing API endpoints by a third party. DataGrail stores your API credentials encrypted and protected.

Scopes

The Facebook Marketing integration requires specific scopes that must be granted in order to function for a given capability.

ScopeOpt Out
ads_management
ads_read
read_insights

Endpoints Utilized

DataGrail uses the following endpoints to authorize and test the connection:


Limits

Limits in Facebook Marketing are calculated using the leaky bucket algorithm. All requests that are made after rate limits have been exceeded are throttled and an HTTP 429 Too Many Requests error is returned. Requests succeed again after enough requests have emptied out of the bucket.

  • DataGrail supports requests throttling to stay within 70-80% of specified service rate limits.
  • DataGrail processes API responses with HTTP 429 status to interrupt requests, waiting and retrying (using an exponential backoff strategy).

Capabilities

Deletion

DataGrail's Facebook Marketing integration provides Asynchronous (Whole Record) Deletion capabilities for the following supported identifier category: Email.

Data Interactions

For Deletion requests, DataGrail will take the following actions:

  1. Fetch all accessible and active Ad Accounts that belong to the relevant Business.
  2. For each retrieved Ad Account, request person removal from all custom audiences containing this person.
  3. Fetch all Custom Audiences.
  4. Remove requested person from the each of the Custom Audiences.

Endpoints Utilized

MethodEndpointPurposeDocs
GET/AUDIENCE_IDFetch Custom Audience
DEL/AUDIENCE_ID/usersRemove person from Custom Audience
GET/act_AD_ACCOUNT_IDFetch active Ad Account
GET/act_AD_ACCOUNT_ID/customaudiencesFetch all Custom Audiences
DEL/act_AD_ACCOUNT_ID/usersofanyaudienceRemove person from all Custom Audiences
GET/me/adaccountsFetch all active Ad Accounts

Opt Out

DataGrail's Facebook Marketing integration provides Opt Out capabilities for the following supported identifier category: Email.

Data Interactions

For Opt Out requests, DataGrail will take the following actions:

  1. Fetch all accessible and active Ad Accounts that belong to the relevant business.
  2. For each collected Ad Account:
    • Fetch all Custom Audiences for the Ad Account.
    • Сheck if Audiences can be edited.
    • Skip audiences that are not active or not ready to be used.

Endpoints Utilized

MethodEndpointPurposeDocs
GET/AUDIENCE_IDFetch Custom Audience
GET/act_AD_ACCOUNT_IDFetch active Ad Account
GET/act_AD_ACCOUNT_ID/customaudiencesFetch all Custom Audiences
GET/me/adaccountsFetch all active Ad Accounts

 

Need help?
If you have any questions, please reach out to your dedicated Account Manager or contact us at support@datagrail.io.

Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.