Marc Van De Sandt
Marc Van De Sandt

Reputation: 81

How do I retrieve the Business Manager ID from Facebook graph api using ad account id

There seems to be nothing in the documentation on how this is achieved.

Using the graph api explorer to achieve this would be of huge help https://developers.facebook.com/tools/explorer/

Thanks for any feedback.

Upvotes: 2

Views: 1212

Answers (1)

Matteo
Matteo

Reputation: 39370

A described in the doc, you can request the business field:

business: The Business Manager, if this ad account is owned by one

As example:

curl -i -X GET \ "https://graph.facebook.com/vX.X/act_XXX?fields=business&access_token="

{
  "business": {
    "id": "XXXX",
    "name": "Acme"
  },
  "id": "act_XXXX"
}

Upvotes: 3

Related Questions