Hi Team, I'm trying to pull a simple report that gets performance data for a sub-section of our accounts based on a given label. However, I'm having a terrible time figuring out how to setup the Predicate correctly, as anything I try results in
[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api. services.common.error.InternalApiError.<init>(InternalApiErro] $user = $this->user; //Reset to the main MCC $user->SetClientCustomerId(AWHelper::$MASTER_CLIENT_ID); // Get the service, which loads the required classes. $managedCustomerService = $user->GetService('ManagedCustomerService', AWHelper::$ADWORDS_VERSION); // Create selector. $selector = new Selector(); // Specify the fields to retrieve. $selector->fields = array('AccountLabels','CustomerId', 'Name', 'CanManageClients', 'CurrencyCode'); $predicate = new Predicate(); $predicate->field = 'AccountLabels'; $predicate->operator = 'CONTAINS_ANY'; $predicate->values = array($labelName); $selector->predicates = array($predicate); // Make the get request. $graph = $managedCustomerService->get($selector); // Display serviced account graph. if (isset($graph->entries)) { $accounts = array(); foreach ($graph->entries as $account) { //Only include non-manager accounts if (!$account->canManageClients) { $accounts[$account->customerId] = $account; } } return $accounts; } else { return null; } I've also tried a few combinations for the predicate such as: $predicate = new Predicate(); $predicate->field = 'AccountLabels'; $predicate->operator = 'IN'; $predicate->values = array($labelName); and $predicate = new Predicate(); $predicate->field = 'AccountLabels'; $predicate->operator = 'EQUALS'; $predicate->values = $labelName; Be advised, I'm trying to filter by Label Name, as I don't know what the Label IDs are. Any help is appreciated. Thanks, -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/5041427d-9d6b-4f37-9d28-a031636c3761%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.