Some of the aliases you requested do not exist create Audiences

Digital Marketing Facebook Marketing API 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ Earlier I had Facebook personal ad account and with the help of https://developers.facebook.com/docs/marketing-api/reference/custom-audience I used to create custom audience. Now I have shifted to business account and trying to call same create custom audience code and it is giving me following error. Uncaught exception 'FacebookAds\Http\Exception\AuthorizationException' with message '(#803) Some of the aliases you requested do not exist: createAudiences Do I need to change marketing API to Business Mapping API or there is some error in current Code? I am using following code $audience = new CustomAudience(null, $accountId); $audience->setData(array( CustomAudienceFields::NAME => $associative_arr['name'], CustomAudienceFields::PIXEL_ID => $associative_arr['pixelId'], CustomAudienceFields::DESCRIPTION => $associative_arr['description'], CustomAudienceFields::RETENTION_DAYS => $associative_arr['retensionDays'], CustomAudienceFields::SUBTYPE => CustomAudienceSubtypes::WEBSITE, CustomAudienceFields::RULE => array('url' => array('i_contains' => $associative_arr['websiteUrl'])), CustomAudienceFields::PREFILL => $associative_arr['prefill'] )); // Create the audience $audience->create(); Any suggestions?

Posted on 16 Aug 2022, this text provides information on Facebook Marketing API related to Digital Marketing. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ Assuming $accountId is in the format act_: $audience = new CustomAudience(null, $accountId); Seems like you don't have permission to create an audience in this Ad Account, try debugging your access token here: https://developers.facebook.com/tools/debug/accesstoken

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.