问题
Background
- I'm building an Ads-Management application tailored towards both marketing / advertising agencies and individual advertisers (users)
- To test marketing-api, I have setup a SandBox ad account
The very first thing that I'm testing is creating and uploading of custom audience (CSV file upload) and sharing it across ad accounts owned by different BusinessManagers.
From what I've gathered thus far, creating custom audience has 2 steps
- Create an empty Custom Audience
- Add (upload) users to a custom audience
For creating an empty Custom audience I follow using the cURL
request from docs
curl -X POST \
-F 'name="My new Custom Audience"' \
-F 'subtype="CUSTOM"' \
-F 'description="People who purchased on my website"' \
-F 'customer_file_source="USER_PROVIDED_ONLY"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v7.0/act_<AD_ACCOUNT_ID>/customaudiences
This gives me
{
"error": {
"message": "Permissions error",
"type": "OAuthException",
"code": 200,
"error_subcode": 1870050,
"is_transient": false,
"error_user_title": "Business Account Needed to Create/Edit This Audience",
"error_user_msg": "To create or edit a Custom Audience made from a customer list, your admin needs to add this ad account to a business.",
"fbtrace_id": "AsMXXXXXXXXXXXXXX-fXXXX"
}
}
What have I done already
Added my
App
(Test-App-1
) to myBusinessManager
(Test-Business-1
)Followed this discussion and added a Admin System User (
Test-Admin-System-User-1
) generated from myBusinessManager
to myApp
Generated access token (with all ads / business related permissions) for my
Test-Admin-System-User-1
to use in API callsClick on
Connect to Business
on my SandBox Ad Account and usedTest-Admin-System-User
to link it with myTest-Business-1
as told here
Where am I stuck
(in addition to the above mentioned error in API response)
Despite having done above mentioned things, the
BusinessManager
continues to say that my request for adding my sandbox ad-account (as identified by it's account_id) is still pendingAnd when I try to forcibly redo it, it tells me that
Your business has already sent this request. To follow up on the request, contact the business you're requesting access from.
I must add that I didn't face the issue of having to accept Terms of Service
- Facebook - custom audience ToS for sandbox account
- How to create a custom audience using facebook api and sandbox ad account?
In other words
- I'm not 100% sure if I've accepted terms of service
- But since the error I get is different, my best guess is that I must've done it at some point of time (can't recall though)
My questions are
- Immediate question: How can I accept the request for adding my Sandbox ad account to my BusinessManager?
- Main question(s)
- where am i going wrong (understanding gap)?
- How to test uploading and sharing custom audience using Sandbox Ad Account
来源:https://stackoverflow.com/questions/61728093/how-to-add-sandbox-ad-account-to-businessmanager