That was the problem :) I had not specified the client_customer_id in the 
googleads.yaml file.

I need to iterate through a number of accounts for the task I've been 
assigned. Is there a python example of how to change the 
campaign_service.client_customer_id on the fly?

Would one create a new client for each account using the LoadFromString() 
method?

Or can I set the client_service.client_customer_id property on the fly 
prior to making my get() calls?

For pseudo-code example:


for ccid in list_of_customer_ids:
 # get the adwords client, would love to pass different client_customer_id 
to this but not sure how to do so
 client = adwords.AdWordsClient.LoadFromString(ccid)

 # or, instead, can I just set the property like this
 client.client_customer_id = ccid

 # obtain the campaign service proxy 
 campaign_service = client.GetService('CampaignService', version='v201809')

 #execute the query 
 query = (adwords.ServiceQueryBuilder()
 .Select('Id', 'Name', 'Status', 'Labels')
 .OrderBy('Name')
 .Limit(0, PAGE_SIZE)
 .Build())

 # do stuff with the campaigns....

 for page in query.Pager(campaign_service):
    ... do stuff with campaign info...




Thanks for any guidance


On Wednesday, January 16, 2019 at 8:09:32 AM UTC-8, 
googleadsapi-forumadvisor wrote:
>
> Hello Scott,
>
> Could you please share the client customer id so that I can troubleshoot 
> the issue? Please note that to get the campaign data, you will need to run 
> the CampaignService.get 
> <https://developers.google.com/adwords/api/docs/reference/v201809/CampaignService#get>
>  
> API call against the non manager Google Ads account. You can use 'Reply 
> privately to author' option while responding.
>
> Thanks,
> Milind, AdWords API Team
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
>     http://googleadsdeveloper.blogspot.com/search/label/adwords_api
>     https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/42928aed-d056-48be-b8c9-35de779c419d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Zero ca... Scott Burkhalter
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... Scott Burkhalter
        • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to