Hi team, I got developer token yesterday and trying my first call, but cannot get any campaigns using - Get all campaigns using AWQL. May I ask you to help me on this issue? It should work...
from googleads import adwords PAGE_SIZE = 10 def main(client): # Initialize appropriate service. campaign_service = client.GetService('CampaignService', version='v201809') # Construct query and get all campaigns. query = (adwords.ServiceQueryBuilder() .Select('Id', 'Name', 'Status') #.Where('Status').EqualTo('ENABLED') #.OrderBy('Name') .Limit(0, PAGE_SIZE) .Build()) for page in query.Pager(campaign_service): # Display results. if 'entries' in page: for campaign in page['entries']: print ('Campaign with id "%s", name "%s", and status "%s" was ' 'found.' % (campaign['id'], campaign['name'], campaign['status'])) else: print ('No campaigns were found.') if __name__ == '__main__': # Initialize client object. adwords_client = adwords.AdWordsClient.LoadFromStorage() adwords_client.SetClientCustomerId('158-702-7304') main(adwords_client) -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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 and Google Ads 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/8b74bf12-02b6-48ee-924e-02fbe11cf03a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.