The 2-Tier Business Manager solution was originally designed so that each user access token could only create one child Business Manager. However, the user can now create multiple child Business Managers as long as a primary page is set on each child Business Manager.
Note: Depending on if appsecret_proof is enabled on your app's settings, appsecret_proof might be needed as a parameter to each call you make. Refer to Securing Graph API Requests doc for how to set this option and how to generate appsecret_proof.
Before you start, we recommend that you review these requirements and information:
business_management
ads_management
PARENT_BM_ID
: ID of the Business Manager of the partner who owns the app.CHILD_BM_ID
: ID of the Business Manager that the Parent BM creates for the client.USER_Personal_Access_Token
: The access token of the person providing the credentials to create the Child BM.
business_management
scopes on the user's businesses and Pages rather than granular scopes.PARENT_BM_ADMIN_SYSTEM_USER_ACCESS_TOKEN
: The access token of the Admin System User in the Parent Business Manager.
CHILD_BM_SYSTEM_USER_ACCESS_TOKEN
: The access token of the Admin System User created in the Child BM.
Using the USER_Personal_Access_Token, create a Child Business Manager.
Example — Returns a Child Business Manager ID
curl \ -F 'id=<Parent_Business_Manager_ID>' \ -F 'name=Advertisers child BM (recommend naming similar to page)' \ -F 'vertical=OTHER' \ // Specify the Business vertical -F 'shared_page_id=<PAGE_ID_FROM_USER>' \ //Optional parameter but needed if you want to publish ads promoting this page //Note: the user must be an admin of the BM that owns this page if this page is owned -F 'page_permitted_tasks=["ADVERTISE", "ANALYZE"]' \ -F 'timezone_id=1' \ -F 'access_token=<USER_Personal_Access_Token>' \ -F 'appsecret_proof=<APP_SECRET_PROOF>' \ // Optional, depending on your app's security settings https://graph.facebook.com/<API_VERSION>/<PARENT_BM_Id>/owned_businesses
Response:
{ “ID” : “12312812123132” //store this child business manager ID and associate to user }
If the user wants to create multiple Child Business Managers using the same user credentials, the primary_page
must be set on existing Child Business Managers created for that user. Make another POST
call to set the primary_page
of the existing Child Business Manager:
curl \ -F 'primary_page=<PAGE_ID>' \ -F 'access_token=<USER_Personal_Access_Token>' \ -F 'appsecret_proof=<APP_SECRET_PROOF>' \ // Optional, depending on your app's security settings https://graph.facebook.com/<API_VERSION>/<BM_ID>
When creating another child Business Manager:
primary_page
.shared_page_id
must be set on the new Child Business Manager.shared_page_id
is used to create a new Child Business Manager, it cannot be a primary_page
on any of the existing Child Business Managers.To pay for the Child BM's advertisements, you will need to share your line of credit with each Child BM.
Step 1. Open a line of credit. Contact your Facebook representative and open a LOC within that Business Manager if does not already exist. The line of credit will display as a payment method in your Parent Business Manager.
Step 2. Accept Line of Credit Legal Terms.
Step 3. Fetch the line of credit ID and share with child Business Manager
PARENT_BM_Line_Of_Credit_ID
from the URL. The URL looks something like this:
https://business.facebook.com/settings/payment-methods/<PARENT_BM_Line_Of_Credit_ID>?business_id=<BUSINESS_ID>
amount
is optional.
curl \ -F 'receiving_business_id=<CHILD_BUSINESS_MANAGER_ID>' \ -F 'amount=<OPTIONAL_PARAMETER>' \ -F 'access_token=<Parent_BM_Admin_System_User_Access_Token>' \ -F 'appsecret_proof=<APP_SECRET_PROOF>' \ // Optional, depending on your app's security settings https://graph.facebook.com/<API_VERSION>/<PARENT_BM_Line_Of_Credit_ID>/owning_credit_allocation_configs
If you don't specify an amount, your line of credit is equally divided among your Child Business Managers.
If you specify an amount only, that portion of your line of credit is assigned to the Child Business Manager.
Under the Child Business Manager, use this API call to create a system user and fetch the access token. This token is used for all subsequent calls to the Child Business Manager for creating or managing ads for this user.
curl \ -F 'id=<CHILD_BUSINESS_MANAGER>' \ -F 'app_id=<App_ID>' \ -F 'scope=ads_management,business_management' \ -F 'access_token=<Parent BM Admin System User Access Token>' \ -F 'appsecret_proof=<APP_SECRET>' \ https://graph.facebook.com/<API_VERSION>/<CHILD_BUSINESS_MANAGER_ID>/access_token
Once you get the access token, you can use it to figure out the app scoped user ID. This is important to keep for storage later on.
curl -G \ -d 'access_token=<Child BM System User Access Token>' \ -d 'appsecret_proof=<APP_SECRET_PROOF>' \ // Optional, depending on your app's security settings https://graph.facebook.com/<API_VERSION>/<CHILD_BM_ID>/system_users
curl -G \ -d 'fields=id,max_balance' \ -d 'access_token=<Child BM Admin System User Access Token>' \ -d 'appsecret_proof=<APP_SECRET_PROOF>' \ // Optional, depending on your app's security settings https://graph.facebook.com/<API_VERSION>/<CHILD_BUSINESS_MANAGER_ID>/extendedcreditsAlternatively, you can fetch the funding source by going to your Child Business Manager and selecting Payments > click Credit Line Payment method. This populates the URL with a payment parameter as follows:
payment-methods/<CHILD_PAYMENT_METHOD_ID>?business_id=
Use the payment method ID from the Child Business Manager as the funding_id
parameter.
funding_id
cannot be updated after the ad account has been created.
curl \ -F 'name=Advertisers Ad Account' \ -F 'currency=USD' \ -F 'timezone_id=1' \ -F 'end_advertiser=<PAGE_ID>' \ -F 'media_agency=NONE' \ -F 'partner=NONE' \ -F 'funding_id=<PAYMENT_METHOD_ID(from above)>' \ -F 'access_token=<Child BM Admin System User Access Token>' \ -F 'appsecret_proof=<APP_SECRET_PROOF>' \ // Optional, depending on your app's security settings https://graph.facebook.com/<API_VERSION>/CHILD_BM_ID/adaccount
Add the system user as an admin to the new ad account under the Child Business Manager:
curl \ -F 'user=<SYSTEM_USER_ID(from above)>' \ -F 'tasks=MANAGE,ADVERTISE,ANALYZE' \ -F 'business=<CHILD_BM_ID>' \ -F 'access_token=<Child BM Admin System User Access Token>' \ -F 'appsecret_proof=<APP_SECRET_PROOF>' \ // Optional, depending on your app's security settings https://graph.facebook.com/<API_VERSION>/<act_ACCOUNT_ID>/assigned_users
Congratulations! This is the final step in setting up a Child Business Manager to create and manage your client's campaigns.
To find all Child Business Manager IDs, run the following command to filter by client’s app scoped user ID:
curl -i -X GET \ -F 'access_token=<PARENT_BM_ADMIN_SYSTEM_USER_ACCESS_TOKEN>' \ -F 'appsecret_proof=<APP_SECRET_PROOF>' \ // Optional, depending on your app's security settings "https://graph.facebook.com/<API_VERSION>/<parent_bm_id>/owned_businesses?client_user_id=<Client’s app scoped user ID>
Find the App scoped user ID with /me?fields=ids_for_apps
(client user access token).
The next topics include additional features/actions you can use to augment your Business Manager experience.
Also, refer to asset sharing guides for accessing client assets into child BMs: