Hi, I'm new to the group and i'm trying to use the api to load some keywords but i'm stuk to the first step. To start I'm trying to set a campaign based on the example found in the examples folder:
#!/usr/bin/python import os from datetime import date # Import appropriate classes from the client library. from adspygoogle.adwords.AdWordsClient import AdWordsClient from adspygoogle.common import Utils # Initialize client object. client = AdWordsClient( {'userAgent': 'TEST', 'developerToken': 'MY_DEV_TOKEN', 'email': "googleacco...@gmail.com", 'password': 'MYPASSWORD' }) # Construct operations and add campaign. campaign_service = client.GetCampaignService( 'https://adwords.google.com', 'v201101') operations = [{ 'operator': 'ADD', 'operand': { 'name': 'Interplanetary Cruise #%s' % Utils.GetUniqueName(), 'status': 'PAUSED', 'biddingStrategy': { 'xsi_type': 'ManualCPC' }, 'endDate': date(date.today().year + 1, 12, 31).strftime('%Y%m%d'), 'budget': { 'period': 'DAILY', 'amount': { 'microAmount': '50000000' }, 'deliveryMethod': 'STANDARD' }, 'networkSetting': { 'targetGoogleSearch': 'true', 'targetSearchNetwork': 'true', 'targetContentNetwork': 'false', 'targetContentContextual': 'false', 'targetPartnerSearchNetwork': 'false' } } }] campaigns = campaign_service.Mutate(operations)[0] # Display results. for campaign in campaigns['value']: print ('Campaign with name \'%s\' and id \'%s\' was added.' % (campaign['name'], campaign['id'])) print print ('Usage: %s units, %s operations' % (client.GetUnits(), client.GetOperations())) But i keep getting an expection: Traceback (most recent call last): File "adwords.py", line 48, in <module> campaigns = campaign_service.Mutate(operations)[0] File "/Users/saveriomucci/.virtualenvs/musixmatch/lib/python2.6/site-packages/adspygoogle/adwords/CampaignService.py", line 125, in Mutate 'Campaign', self._loc, request) File "/Users/saveriomucci/.virtualenvs/musixmatch/lib/python2.6/site-packages/adspygoogle/adwords/AdWordsWebService.py", line 264, in CallMethod self.__ManageSoap(buf, start_time, stop_time, error) File "/Users/saveriomucci/.virtualenvs/musixmatch/lib/python2.6/site-packages/adspygoogle/adwords/AdWordsWebService.py", line 127, in __ManageSoap raise e adspygoogle.adwords.AdWordsErrors.AdWordsApiError Am I doing something wrong or is related to my env? The auth of the client does not give any exception and i'm supposing it is working correctly... Thanks in advance for any help Saverio -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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