Search code examples
facebookfacebook-graph-apifacebook-ads-apifacebook-marketing-api

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.


Solution

  • 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"
    }