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

Authentication & Authorization

Credentials

  • Facebook Marketing uses an Access Token to authenticate.

  • Access Token can be generated from the Facebook for Developers account (see the DataGrail Help Docs).

  • Publicly exposing your API credentials can allow unauthorized access to the Facebook Marketing API endpoints, and your Facebook Marketing data by a third party. DataGrail stores your API credentials encrypted and protected.

Permissions

Access Token should be configured with the following permissions:

  • ads_management

  • ads_read

  • read_insights

Endpoints Utilized

DataGrail uses the following endpoint to validate that credentials are good based on a successful response:

  • GET https:​//graph.facebook.com/v22.0/me/adaccounts

Version

DataGrail integration supports the latest Facebook Marketing API (v22.0).

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).

Do Not Sell

For a Do Not Sell request, DataGrail will take the following actions:

  • Fetch all accessible active Ad Accounts which belong to some Business.

  • For each of collected Ad Accounts:

    • Fetch all Custom Audiences of Ad Account.

    • Сheck if Audiences from active Ad Accounts can be edited. Skip audiences that are not active or not ready to be used.

    • Remove an user with a Data Subject email from the Custom Audiences of Ad Account.

  • General request status will be false if at least 1 Audience can be used but can not be really edited or at least 1 deletion operation be failed. Otherwise it will be true.

Endpoints Utilized

Deletion

For a deletion request, DataGrail will take the following actions:

Step 1. Request Removal From Custom Audiences

Step 2. Removing person from the each of the Custom Audiences

By default, Facebook Marketing deletion does not occur immediately and usually take up to 24 hours to process. The more posts you delete and/or the more custom audiences your account contains, the longer it takes to process your request. If a request for erasure is submitted during that time, the request in DataGrail will remain in a pending state until the required time has passed and data can be deleted.

You may manage the status of the DataGrail request to erase Facebook Marketing data via the connection option: Deletion Behavior:

  • If you select Mark integration as complete when a deletion request is successfully submitted:
    • DataGrail will send the deletion request to Facebook Marketing and mark the request as successfully completed within DataGrail. DataGrail will not create a scheduling task to ensure data has been deleted.
  • If you select Continue processing until the deletion request is completed (default behavior):

Endpoints Utilized

  • GET /me/adaccounts
  • GET /act_{AD_ACCOUNT_ID}
  • DELETE /act_{AD_ACCOUNT_ID}/usersofanyaudience
  • GET /act_{AD_ACCOUNT_ID}/customaudiences
  • GET /{AUDIENCE_ID}
  • DELETE /{AUDIENCE_ID}/users

 

Need help?
If you have any questions, please reach out to your dedicated CSM 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.