mikron
mikron

Reputation: 683

Facebook api - request business manager partnership

Is it possible to programmatically request business partner with access assets business owns. Facebook business-manager-api describes best practices to work with business-manager-api. Would be very handly if our app can request partnership to client or agencies business managers programmatically.

Update So after digging documentation, playing with Facebook Graph API and asking on official Q/A groups we came to conclusion, that at this moment Facebook API doesn't provide any endpoint to request business partnership. So we refactor our flow and now we will request access to business's ad accounts. I will accept answer as correct, cause at this moment this is the only possible solution

Upvotes: 1

Views: 2092

Answers (2)

Mina Zakaria
Mina Zakaria

Reputation: 103

When using this api now

curl \
-F "adaccount_id=act_<AD_ACCOUNT_ID>" \
-F "permitted_roles=['GENERAL_USER','REPORTS_ONLY']" \
"https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/client_ad_accounts?access_token=<ACCESS_TOKEN>"

it says "(#3) Application does not have the capability to make this API call."

you should use Business On Behalf Of instead.

Upvotes: 1

Nazareno Lorenzo
Nazareno Lorenzo

Reputation: 1079

The Business Manager API provide a functionality to request access to assets. This is documented in the Business-to-Business Functions of the Assets section.

For example,

Business Manager may request access to an ad account or a page owned by another business manager. They must specify the roles that they want need to be able to assign in the request.

To request AGENCY access, you must provide permitted_roles in your request. You can only send request to assets to business manager that you intend to approve and that they must already know your business.

For example, a business that needs access to adaccount_id and needs to be able to assign its employees as GENERAL_USER and REPORTS_ONLY would make this POST call:

curl \
-F "adaccount_id=act_<AD_ACCOUNT_ID>" \
-F "permitted_roles=['GENERAL_USER','REPORTS_ONLY']" \
"https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/client_ad_accounts?access_token=<ACCESS_TOKEN>"

Upvotes: 1

Related Questions