I have a similar issue. I am currently still running the get_campaigns.py example in my console. It's been running for over an hour. The data is not that high in volume. I can successfully return the data in Google Sheets with the Google Ads Add-On. I specified the customer ID in the code (not the manager account ID). I am running on a test developer token. The client is in my manager account. However, is the reason it is just running without completing because I am using a test developer token? I am authenticated without any issues. I am using the google-ads python library. My file looks like this:(Note: I have blanked out the customer ID as we have NDA contracts and GDPR to comply with.) I have pulled from several different APIs and this has by far been the most ridiculous headache I have ever experienced with one.
#!/usr/bin/env python # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """This example illustrates how to get all campaigns. To add campaigns, run add_campaigns.py. """ from __future__ import absolute_import import argparse import six import sys import google.ads.google_ads.client _DEFAULT_PAGE_SIZE = 1000 customer_id="xxx-xxx-xxxx" def main(client, customer_id, page_size): ga_service = client.get_service('GoogleAdsService', version='v2') query = ('SELECT campaign.id FROM campaign ORDER BY campaign.id') results = ga_service.search(customer_id, query=query, page_size=page_size) try: for row in results: print('Campaign with ID %d and name "%s" was found.' % (row.campaign.id.value)) except google.ads.google_ads.errors.GoogleAdsException as ex: print('Request with ID "%s" failed with status "%s" and includes the ' 'following errors:' % (ex.request_id, ex.error.code().name)) for error in ex.failure.errors: print('\tError with message "%s".' % error.message) if error.location: for field_path_element in error.location.field_path_elements: print('\t\tOn field: %s' % field_path_element.field_name) sys.exit(1) if __name__ == '__main__': # GoogleAdsClient will read the google-ads.yaml configuration file in the # home directory if none is specified. google_ads_client = GoogleAdsClient.load_from_storage(path='E:/Work/AWAPI/venv/google-ads.yaml') parser = argparse.ArgumentParser( description='Lists all campaigns for specified customer.') # The following argument(s) should be provided to run the example. parser.add_argument('-c', '--customer_id', type=six.text_type, required=True, help='The Google Ads customer ID.') args = parser.parse_args() main(google_ads_client, args.customer_id, _DEFAULT_PAGE_SIZE) On Tuesday, November 5, 2019 at 5:06:47 AM UTC-5, Suresh Kumar Shenbagam wrote: > > Hi Team, > > I am trying to retrieve recommendations using google ads API as mentioned > here - > https://developers.google.com/google-ads/api/docs/samples/get-text-ad-recommendations > The authentication was successful, but there was no response - it got > stuck in the searchrequest. I am using test account - but any way it should > return atleast empty recommendation. > > I can send you the customer id privately, if required. Please let me know. > > Suresh > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/604176b7-3e73-4aac-ab8a-fa44f2d355ea%40googlegroups.com.