(public answer with obfuscated sensitive information)

The account I am testing with has two managed accounts linked to it. It 
should (and has in the past) return both for the specified request. 
However, even if the second account has some problem, the original one is 
clearly a managed account, since I created it and am the only one who has 
access to it. Or am I misunderstanding something here?

Anyway, this is what I get with DEBUG level enabled for logging:

[2018-04-05 08:54:16,481 - googleads.soap - INFO] Request made: Service: 
"ManagedCustomerService" Method: "get" URL: 
"https://adwords.google.com/api/adwords/mcm/v201802/ManagedCustomerService";

[2018-04-05 08:54:16,481 - googleads.soap - DEBUG] Outgoing request: {
'SOAPAction': '""', 'Content-Type': 'text/xml; charset=utf-8', 
'authorization': 'REDACTED'}
<soap-env:Envelope xmlns:soap-env=
"http://schemas.xmlsoap.org/soap/envelope/";>
  <soap-env:Header>
    <ns0:RequestHeader xmlns:ns0=
"https://adwords.google.com/api/adwords/mcm/v201802";>
      <ns1:clientCustomerId xmlns:ns1=
"https://adwords.google.com/api/adwords/cm/v201802";>481XXX120<
/ns1:clientCustomerId>
      <ns2:developerToken xmlns:ns2="https://adwords.google.com/api/adwords/
cm/v201802">GPaXXXXXXXyw</ns2:developerToken>
      <ns3:userAgent 
xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802";>unknown 
(AwApi-Python, googleads/11.0.0, Python/3.6.0, zeep)</ns3:userAgent>
      <ns4:validateOnly xmlns:ns4=
"https://adwords.google.com/api/adwords/cm/v201802";>false</ns4:validateOnly>
      <ns5:partialFailure xmlns:ns5="https://adwords.google.com/api/adwords/
cm/v201802">false</ns5:partialFailure>
    </ns0:RequestHeader>
  </soap-env:Header>
  <soap-env:Body>
    <ns0:get xmlns:ns0="https://adwords.google.com/api/adwords/mcm/v201802";>
      <ns0:serviceSelector>
        <ns1:fields xmlns:ns1=
"https://adwords.google.com/api/adwords/cm/v201802";>Name</ns1:fields>
        <ns2:fields xmlns:ns2="https://adwords.google.com/api/adwords/cm/
v201802">CustomerId</ns2:fields>
        <ns3:fields xmlns:ns3="https:
//adwords.google.com/api/adwords/cm/v201802">CanManageClients</ns3:fields>
        <ns4:paging xmlns:ns4=
"https://adwords.google.com/api/adwords/cm/v201802";>
          <ns4:startIndex>0</ns4:startIndex>
          <ns4:numberResults>100</ns4:numberResults>
        </ns4:paging>
      </ns0:serviceSelector>
    </ns0:get>
  </soap-env:Body>
</soap-env:Envelope>

[2018-04-05 08:54:16,481 - zeep.transports - DEBUG] HTTP Post to https://
adwords.google.com/api/adwords/mcm/v201802/ManagedCustomerService:
<?xml version='1.0' encoding='utf-8'?>
<soap-env:Envelope
    xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap-env:Header>
        <ns0:RequestHeader
            xmlns:ns0="https://adwords.google.com/api/adwords/mcm/v201802";>
            <ns1:clientCustomerId
                xmlns:ns1=
"https://adwords.google.com/api/adwords/cm/v201802";>481XXX120
            </ns1:clientCustomerId>
            <ns2:developerToken
                xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802
">GPaXXXXXXXyw
            </ns2:developerToken>
            <ns3:userAgent
                
xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201802";>unknown 
(AwApi-Python, googleads/11.0.0, Python/3.6.0, zeep)
            </ns3:userAgent>
            <ns4:validateOnly
                xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201802
">false
            </ns4:validateOnly>
            <ns5:partialFailure
                xmlns:ns5="https:
//adwords.google.com/api/adwords/cm/v201802">false
            </ns5:partialFailure>
        </ns0:RequestHeader>
    </soap-env:Header>
    <soap-env:Body>
        <ns0:get
            xmlns:ns0="https://adwords.google.com/api/adwords/mcm/v201802";>
            <ns0:serviceSelector>
                <ns1:fields
                    xmlns:ns1="https:
//adwords.google.com/api/adwords/cm/v201802">Name
                </ns1:fields>
                <ns2:fields
                    xmlns:ns2="https://adwords.google.com/api/adwords/cm/
v201802">CustomerId
                </ns2:fields>
                <ns3:fields
                    xmlns:ns3="https:
//adwords.google.com/api/adwords/cm/v201802">CanManageClients
                </ns3:fields>
                <ns4:paging
                    xmlns:ns4="https://adwords.google.com/api/adwords/cm/
v201802">
                    <ns4:startIndex>0</ns4:startIndex>
                    <ns4:numberResults>100</ns4:numberResults>
                </ns4:paging>
            </ns0:serviceSelector>
        </ns0:get>
    </soap-env:Body>
</soap-env:Envelope>

[2018-04-05 08:54:17,222 - zeep.transports - DEBUG] HTTP Response from 
https://adwords.google.com/api/adwords/mcm/v201802/ManagedCustomerService 
(status: 200):
<soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap:Header>
        <ns2:ResponseHeader
            xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201802";
            xmlns="https://adwords.google.com/api/adwords/cm/v201802";>
            <requestId>00056916XXX01d944</requestId>
            <serviceName>ManagedCustomerService</serviceName>
            <methodName>get</methodName>
            <operations>1</operations>
            <responseTime>181</responseTime>
        </ns2:ResponseHeader>
    </soap:Header>
    <soap:Body>
        <ns2:getResponse
            xmlns="https://adwords.google.com/api/adwords/cm/v201802";
            xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201802";>
            <ns2:rval>
                <totalNumEntries>0</totalNumEntries>
                <Page.Type>ManagedCustomerPage</Page.Type>
            </ns2:rval>
        </ns2:getResponse>
    </soap:Body>
</soap:Envelope>

[2018-04-05 08:54:17,223 - googleads.soap - DEBUG] Incoming response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ns2:ResponseHeader xmlns:ns2=
"https://adwords.google.com/api/adwords/mcm/v201802"; xmlns=
"https://adwords.google.com/api/adwords/cm/v201802";>
      <requestId>00056916XXX01d944</requestId>
      <serviceName>ManagedCustomerService</serviceName>
      <methodName>get</methodName>
      <operations>1</operations>
      <responseTime>181</responseTime>
    </ns2:ResponseHeader>
  </soap:Header>
  <soap:Body>
    <ns2:getResponse xmlns="https://adwords.google.com/api/adwords/cm/
v201802" xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201802";>
      <ns2:rval>
        <totalNumEntries>0</totalNumEntries>
        <Page.Type>ManagedCustomerPage</Page.Type>
      </ns2:rval>
    </ns2:getResponse>
  </soap:Body>
</soap:Envelope>








On Wednesday, April 4, 2018 at 11:34:06 PM UTC+3, Bharani Cherukuri 
(AdWords API Team) wrote:
>
> Hello, 
>
> To get the client accounts under a manager account, you will need to make 
> sure that the client customer Id in the request header is set to the 
> manager account. If this does not fix your issue, could you please enable 
> logging by setting the level as 'DEBUG' and share the SOAP logs including 
> the header so that I can take a look? You could use *reply privately to 
> author *while sharing the logs. You may refer to this guide 
> <https://developers.google.com/adwords/api/docs/guides/call-structure#api_call_example>
>  on 
> how the sample logs look like.
>
> Regards,
> Bharani, AdWords API Team
>
> On Wednesday, April 4, 2018 at 1:36:00 PM UTC-4, Normunds Vilcins wrote:
>>
>> Hi!
>>
>>
>> We are fetching the list of managed customers like this:
>>
>>     managed_customer_service = self._client.GetService(
>> 'ManagedCustomerService', version='v201708')
>>     selector = {
>>         "fields": ['Name', 'CustomerId', 'CanManageClients'],
>>         "paging": {
>>             "startIndex": "0", "numberResults": "100",
>>         }
>>     }
>>     more_pages = True
>>     while more_pages:
>>         page = managed_customer_service.get(selector)
>>         # .. process page ..
>>
>>
>>
>> This worked fine until recently. After looking into logs we saw this:
>>
>> Response summary - {'requestId': 0005690...9b06, 'responseTime': 187, 
>> 'serviceName': CustomerService, 'methodName': getCustomers, 'operations': 
>> 0, 'isFault': True, 'faultMessage': "[RequestError.UNSUPPORTED_VERSION @ 
>> ; trigger:'You are accessing an AdWords API version v201708 that has been 
>> discontinued. Calls to this version may fail. Please visit the AdWords API 
>> blog for information on migration to the new AdWords API version.']"}
>>
>>
>> So we tried upgrading the version. Now, however, the call simply returns 
>> an empty result (no errors).
>>
>> > print(page)
>> > {
>> >     'totalNumEntries': 0,
>> >     'Page.Type': 'ManagedCustomerPage',
>> >     'entries': [],
>> >     'links': []
>> > }
>>
>> Tried with both "v201710" and "v201802".
>>
>>
>> After turning on the soap interaction logs ( 
>> https://github.com/googleads/googleads-python-lib#how-do-i-log-soap-interactions
>>  )
>>
>> logging.basicConfig(level=logging.INFO, format=googleads.util.
>> LOGGER_FORMAT)
>> logging.getLogger('suds.transport').setLevel(logging.DEBUG)
>>
>> we only get this:
>>
>> [2018-04-04 17:09:36,525 - googleads.soap - INFO] Request made: Service: 
>> "ManagedCustomerService" Method: "get" URL: "
>> https://adwords.google.com/api/adwords/mcm/v201802/ManagedCustomerService
>> "
>>
>>
>> Shouldn't be an authentication related problem because (a) we don't get 
>> any (including authentication related) errors, and (b) we get non-empty 
>> results from other endpoints (e.g., CustomerService).
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2e243ce5-d547-427a-97a0-81f76b0fe020%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Normunds Vilcins
    • ... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • ... Normunds Vilcins
    • ... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • ... loredana . ilie
    • ... 'Bharani Cherukuri (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to