Thanks Josh and Zweitze for all the help. It works now for me if I change 
the version back to v201601. I was getting this error when using v201603 
which is the latest release. 

Yang

On Thursday, April 14, 2016 at 12:38:59 AM UTC+8, Josh Radcliff (AdWords 
API Team) wrote:
>
> Hi,
>
> Thanks, Zweitze, for helping out here. I just confirmed that with my test 
> manager account, I *do* get back account labels if I include 
> *AccountLabels* in the selector.
>
>                 <ns2:entries>
>                     <ns2:name>Test 3</ns2:name>
>                     <ns2:customerId>...</ns2:customerId>
>                     <ns2:accountLabels>
>                         <ns2:id>4099876</ns2:id>
>                         <ns2:name>Express</ns2:name>
>                     </ns2:accountLabels>
>                 </ns2:entries>
>
> I also confirmed I was able to filter by *AccountLabels*, but make sure 
> that you use one of *CONTAINS_ALL*, *CONTAINS_ANY*, or *CONTAINS_NONE* when 
> filtering on this field 
> <https://developers.google.com/adwords/api/docs/guides/labels#use_your_labels_to_retrieve_objects>,
>  
> since the field is a collection of label IDs.
>
>                 <ns10:predicates xmlns:ns10="
> https://adwords.google.com/api/adwords/cm/v201601";>
>                     <ns10:field>*AccountLabels*</ns10:field>
>                     <ns10:operator>CONTAINS_ANY</ns10:operator>
>                     <ns10:values>4099876</ns10:values>
>                 </ns10:predicates>
>
> Please give that a try and let me know if you're still encountering issues.
>
> Thanks,
> Josh, AdWords API Team
>
> On Wednesday, April 13, 2016 at 5:39:46 AM UTC-4, Zweitze wrote:
>>
>> I can get labels using C# on .NET 4.5, v201601 and without predicates. I 
>> get actual labels, not label ids.
>> My only help was pointing out that predicate values should be passed as 
>> an array of string, not as an array of long.
>>  
>> I suggest running it again, recording the requestId in the response, and 
>> posting that requestId here. The engineers in this forum can figure out 
>> what happened using those requestId, provided it's recent.
>>
>>
>> On Wednesday, April 13, 2016 at 2:20:46 AM UTC+2, Yang wrote:
>>>
>>> Thanks for the suggestion. Just tried and it still doesn't work. Does it 
>>> work for you? I.e. are you even able to pull any non-null AccountLabels out 
>>> of the ManagedCustomerService, using the latest version, v201603?
>>>
>>> On Wednesday, April 13, 2016 at 6:38:05 AM UTC+8, Zweitze wrote:
>>>>
>>>> Try passing the predicate values as string, as they should be:
>>>>
>>>> {'predicates': [{'operator': 'IN', 'field': 'AccountLabels', 'values': 
>>>> [*'4038216', '4038261'*]}], 'fields': ['AccountLabels', 
>>>> 'CanManageClients', 'CompanyName', 'CurrencyCode', 'CustomerId', 
>>>> 'DateTimeZone', 'Name', 'TestAccount'], 'paging': {'startIndex': '0', 
>>>> 'numberResults': '500'}}
>>>>
>>>>
>>>>
>>>>
>>>> On Tuesday, April 12, 2016 at 2:47:48 PM UTC+2, Yang wrote:
>>>>>
>>>>> Hi Josh. I'm having the same issue. I'm using the python client 
>>>>> library, v201603 for your reference. I'm using the same top-level MCC for 
>>>>> both AccountLabelService (which works) and ManagedCustomerService, which 
>>>>> doesn't. If I use the the "AccountLabels" in the predicate of the 
>>>>> selector, 
>>>>> it fails with the following:
>>>>>
>>>>> WebFault: Server raised fault: 
>>>>> '[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ 
>>>>> com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]'
>>>>>
>>>>> However, if I just include "AccountLabels" as a column but not in the 
>>>>> predicate, the query works but the results do not contain any 
>>>>> "accountLabel" field. Below is my selector passed into 
>>>>> ManagedCustomerService. 
>>>>>
>>>>>
>>>>> {'predicates': [{'operator': 'IN', 'field': 'AccountLabels', 'values': 
>>>>> [4038216, 4038261]}], 'fields': ['AccountLabels', 'CanManageClients', 
>>>>> 'CompanyName', 'CurrencyCode', 'CustomerId', 'DateTimeZone', 'Name', 
>>>>> 'TestAccount'], 'paging': {'startIndex': '0', 'numberResults': '500'}}
>>>>>
>>>>> Pls help, thanks!
>>>>>
>>>>> Yang
>>>>>
>>>>>
>>>>>
>>>>> On Friday, June 5, 2015 at 5:06:41 AM UTC+8, Josh Radcliff (AdWords 
>>>>> API Team) wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> It looks like you may be setting the *clientCustomerId* SOAP header 
>>>>>> to the child account, in which case you won't get the account labels 
>>>>>> back 
>>>>>> in the response because they are defined in the MCC account 
>>>>>> (437-819-4458), 
>>>>>> not the child account.
>>>>>>
>>>>>> Instead, please try setting the *clientCustomerId* SOAP header to 
>>>>>> the MCC account that owns the account labels (437-819-4458 in this 
>>>>>> case), 
>>>>>> then add a predicate on *CustomerId* if you want to limit the 
>>>>>> request to specific child accounts.
>>>>>>
>>>>>> Thanks,
>>>>>> Josh, AdWords API Team
>>>>>>
>>>>>> On Wednesday, June 3, 2015 at 5:56:20 PM UTC-4, Zweitze wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm trying to retrieve the labels of an account. To my surprise it 
>>>>>>> is always NULL.
>>>>>>> Sample code (C#)
>>>>>>>
>>>>>>>     ManagedCustomerService mcs = User.GetService(
>>>>>>>     AdWordsService.v201502.ManagedCustomerService);
>>>>>>>
>>>>>>>     Selector Selector = new Selector();
>>>>>>>     Selector.fields = new string[] { "CustomerId", "AccountLabels",
>>>>>>>         "Name", "CompanyName", "CanManageClients" };
>>>>>>>
>>>>>>>     ManagedCustomerPage mcp = mcs.get(Selector);
>>>>>>>
>>>>>>> And then I end up with exactly one ManagedCustomer, where attributes 
>>>>>>> customerId, name, companyName and canManageClients are all set, but 
>>>>>>> accountLabels is not.
>>>>>>> I tested this with MCC 437-819-4458 (meaning, the refreshToken was 
>>>>>>> issued to a login to this MCC) and CustomerId 892-838-4200. In the 
>>>>>>> AdWords web interface, when logged in to the same MCC, I see two labels.
>>>>>>>
>>>>>>> A recent RequestId of such a call is 
>>>>>>> 000517a3e84613800ac216e46100e07b.
>>>>>>>
>>>>>>> I tried with requesting fewer fields, just CustomerId and 
>>>>>>> AccountLabels, but attribute accountLabels remain empty. What am I 
>>>>>>> doing 
>>>>>>> wrong?
>>>>>>>
>>>>>>> Thank in advance!
>>>>>>>
>>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d4578eb0-a402-4b1a-a67e-d5373d750fcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to