How to get FB Ad Account Id via API?

user2720797 picture user2720797 · Apr 6, 2015 · Viewed 9.9k times · Source

With new facebook ads API. How do I find all the ad account ID's associated with a user?

I see all the documentation about how to get details about an Account (given id). But I can not find how to get a User's ad account id (via api) https://developers.facebook.com/docs/marketing-api/adaccount/v2.3

Please advise.

Answer

bjeavons picture bjeavons · Apr 6, 2015

Hit the /me/adaccounts path to retrieve accounts your access token (and app) can read.

See the Edges section of the user Graph API documentation for the adaccounts edge: https://developers.facebook.com/docs/graph-api/reference/user