Standard Access Level Approval Response

2022-07-06 Thread Travis
Hello Google and Others,

My organization has been in the process of back and forth multi week 
communication with the Google Ads API Compliance Team, and we were 
receiving email responses back approximately the next business day. 
However, the last email we received from Google was 8 days ago. Is the 
Google Ads API Compliance Team unavailable? This is becoming a significant 
issue for my organization and our customers due to the increasingly high 
error rate of the Adwords API that we are trying to replace with the Google 
Ads API. For our reporting volume we need Standard Access level approval as 
the Basic Access level daily operations limit  /quota is too low.

Appreciate any help or insight!

Sincerely,
Travis

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/4ce1fcc4-a982-46a4-9cac-62475b26d6cdn%40googlegroups.com.


Re: Faster/async uploading?

2018-02-04 Thread Travis
Man that is a huge bummer. Is there a way I can do some kind of multi-part 
upload so I can at least upload several MB of images at once rather than 
the overhead costs incurred by uploading a single stupid 10kb image? It 
takes 1 second for a 10kb image roundtrip which seems crazy when I have so 
many to do 
On Sunday, February 4, 2018 at 10:12:31 PM UTC-8, Peter Oliquino wrote:
>
> Hi Travis,
>
> Currently this is the only way to upload images using the AdWords API, 
> since the MediaService is not supported 
> <https://developers.google.com/adwords/api/docs/guides/batch-jobs#supported_operations>
>  by 
> the BatchJobService 
> <https://developers.google.com/adwords/api/docs/reference/v201710/BatchJobService>.
>  
> As for the download feature that you mentioned, it is also not supported. 
> You may reach out to the product experts over at the AdWords Community 
> Forum 
> <https://www.en.advertisercommunity.com/t5/Google-AdWords/ct-p/Google_AdWords#>
>  to 
> confirm if there is an available feature that you could use as a workaround.
>
> However, as for associating these images (once uploaded) to ad groups as 
> an AdGroupAd 
> <https://developers.google.com/adwords/api/docs/reference/v201710/AdGroupAdService.AdGroupAd>,
>  
> then you may be able to create a bulk process using the BatchJobService 
> since the AdGroupAdOperation is supported. You may refer to the rest of 
> this guide 
> <https://developers.google.com/adwords/api/docs/guides/batch-jobs> for 
> more information on how to setup this implementation.
>
> I hope this has been helpful.
>
> Best regards,
> Peter
> AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/d22d9266-cbe9-416e-b834-8eb26cb9bf6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Faster/async uploading?

2018-02-03 Thread Travis
I'm using the *MediaService* to upload image ads to a bunch of ad groups.

Unfortunately it's extremely slow... each IAB size takes 1-2 seconds to 
upload, and with 5-10 sizes per ad thats 5-10 seconds, and I have 500 ad 
groups to do.

Is there a way I can utilize asynchronous uploading or something, or make 
Google download the image instead of me having to upload the image? What 
are my other options, this is excruciating.

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/58c87b50-d93d-4ff8-b22f-a525cf6e0d38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AuthenticationError.NOT_ADS_USER

2018-02-02 Thread Travis
Damn I've seriously looked through 100 threads related to this and finally 
found one that was helpful. The step I was missing was adding the 
`client_id` from the JSON key to the 'authorized client' list in 
admin.google.com, and also the `oauth2_prn` user to impersonate.

Now I have a new error though... 
`AuthorizationError.USER_PERMISSION_DENIED`. Am I supposed to use the 
global MCC account rather than my test MCC? (My dev token isnt approved 
yet). If I use my master MCC email for `oauth2_prn` I get the above error, 
but if I use my test MCC I made I get this error: `Client is unauthorized 
to retrieve access tokens using this method.`

Here is how I have it set up again:

- **Production** Google developer console (domain-enabled service account 
used for `oauth2_key`, `oauth2_issuer`)
- **Production** GSuite account (enable production service account access 
to `https://www.googleapis.com/auth/adwords`)
- **Production** MCC account (API key used for `developer_token`)
- **Test** MCC account (email for `oauth2_prn`)
- **Test** client account (customer id for `client_customer_id`)

They key takeaway is all this was under the production account. The only 
test stuff I created was MCC/client account (I didnt create a test google 
developer console service or API access or anything like that)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/ee79149f-5a8e-41a4-ab1d-0137d300c0fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


AuthenticationError.NOT_ADS_USER

2018-02-02 Thread Travis
I've followed the directions best I could and when I run the following test 
command I get this error:

Fault message: [AuthenticationError.NOT_ADS_USER @ ; trigger:'']

Here is how I'm authenticating (JSON key parsed via `OpenSSL::PKey::RSA`):

json = JSON.parse(Rails.application.secrets.adwords[:oauth2_key])
key = OpenSSL::PKey::RSA.new(json['private_key'])

@client = AdwordsApi::Api.new({
  authentication: {
method: 'OAUTH2_SERVICE_ACCOUNT',
user_agent: 'AdManager/1.0.0',
oauth2_key: key,
oauth2_issuer:  
Rails.application.secrets.adwords[:oauth2_issuer],
developer_token:
Rails.application.secrets.adwords[:developer_token],
client_customer_id: customer_id
  },
  service: {
environment: 'PRODUCTION'
  },
  connection: {
enable_gzip: false
  },
  library: {
log_level: 'INFO'
  }
})

@client.service(:CampaignService, :v201708).get({:fields => ['Id', 
'Name', 'Status']}

Here are the steps I did in order:

1. Log into my MCC AdWords account
2. Visit Google Developer Console
3. Create a new Project
4. Create a Service Account key. Make sure the domain checkbox is checked. 
I use the email address it generates above in `oauth2_issuer`
5. Download the JSON key
6. Get an MCC account (I actually had one I use for live campaigns, so I 
skipped this step)
7. Generate an AdWords API key from within MCC (i used it above in 
`developer_token`).
8. Create a new test manager account.
9. Inside the new test manager account, create a new test client account, 
and take that customer ID and place it above in `client_customer_id.

I'm not sure where I went wrong, from what I can tell I followed the steps 
exactly.

Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/bc627756-fc81-4d23-a0d3-27adcd965c0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


AuthenticationError.NOT_ADS_USER

2018-02-02 Thread Travis
I've followed the directions best I could and when I run the following test 
command I get this error:

Fault message: [AuthenticationError.NOT_ADS_USER @ ; trigger:'']

Here is how I'm authenticating (JSON key parsed via `OpenSSL::PKey::RSA`):

json = JSON.parse(Rails.application.secrets.adwords[:oauth2_key])
key = OpenSSL::PKey::RSA.new(json['private_key'])

@client = AdwordsApi::Api.new({
  authentication: {
method: 'OAUTH2_SERVICE_ACCOUNT',
user_agent: 'AdManager/1.0.0',
oauth2_key: key,
oauth2_issuer:  
Rails.application.secrets.adwords[:oauth2_issuer],
developer_token:
Rails.application.secrets.adwords[:developer_token],
client_customer_id: customer_id
  },
  service: {
environment: 'PRODUCTION'
  },
  connection: {
enable_gzip: false
  },
  library: {
log_level: 'INFO'
  }
})

@client.service(:CampaignService, :v201708).get({:fields => ['Id', 
'Name', 'Status']}

Here are the steps I did in order:

1. Log into my MCC AdWords account
2. Visit Google Developer Console
3. Create a new Project
4. Create a Service Account key. Make sure the domain checkbox is checked. 
I use the email address it generates above in `oauth2_issuer`
5. Download the JSON key
6. Get an MCC account (I actually had one I use for live campaigns, so I 
skipped this step)
7. Generate an AdWords API key from within MCC (i used it above in 
`developer_token`).
8. Create a new test manager account.
9. Inside the new test manager account, create a new test client account, 
and take that customer ID and place it above in `client_customer_id`.

I'm not sure where I went wrong, from what I can tell I followed the steps 
exactly.

Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/94e61de7-598f-4694-b9ab-835deac7c74c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Exporting information from the Keyword Tool directly into Excel using API

2011-04-11 Thread travis-acp
Hello Group,

First off I want to make it known that I am not the actual coder, just
the overseer of this project.  So please forgive me if I am leaving
off any information or buzzwords necessary to solve this question.
Basically we need the API to do two things for us:

1. Pull information from the Keyword Tool for only the keywords we
give it
1a. In other words, instead of the usual where the Keyword Tool gives
you suggestions along with your original list of keywords, we want
only the list of keywords originally inputed

2. The ability to run and export this information from within Excel (a
plugin type thing)

Thanks alot, please let me know if you need more info that will help
solve the issue.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


AdWords API Still over keyword quota, campaigns deleted

2009-11-30 Thread Travis B
Hi,

I got the following message while attempting to post:

aw_api.Errors.RequestError: Code 17: The campaigns for this customer
already have the maximum number of active keywords permitted, so this
campaign may not be activated.

I then deleted all of the campaigns in the account, however I am still
receiving the same message. I'm also getting all the UI warnings about
having lots of keywords. Do I need to individually delete each
keyword?

Thanks,
-Travis

--

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-...@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.




AdWords API Re: AdGroup negative criteria with v13

2009-11-17 Thread Travis B
Hi Eric,

I am using awapi_python_lib_7.2.0 for python. It works fine for
posting keywords where I don't set 'negative': True.

The method looks like this
BEGIN CODE
def add_keywords(self, ad_group_id, keyword_list, match_type):
neg_criteria = []
print match_type
if match_type == mt_broad:
one_type = 'Broad'
neg_criteria.extend([{'negative': True,
  'adGroupId':ad_group_id,
  'text':x,
  'type':'Phrase'} for x in
keyword_list.keys()])
neg_criteria.extend([{'negative': True,
  'adGroupId':ad_group_id,
  'text':x,
  'type':'Exact'} for x in
keyword_list.keys()])
elif match_type == mt_phrase:
one_type = 'Phrase'
neg_criteria.extend([{'negative': True,
  'adGroupId':ad_group_id,
  'text':x,
  'type':'Exact'} for x in
keyword_list.keys()])
elif match_type == mt_exact:
one_type = 'Exact'


criteria = [{'adGroupId':ad_group_id,
 'criterionType':'Keyword',
 'destinationUrl':v['keyword_url'],
 'maxCpc': str(round_micro_to_cent(v
['keyword_max_cpc'])),
 'text':x,
 'type':one_type,
 } for x,v in keyword_list.items()]
criteria.extend(neg_criteria)
res = self._criterion_service.AddCriteria(criteria)

return res
==END CODE

keyword_list is a dictionary that looks something like this:
=BEGIN DICT
{
  'race ny': {'keyword_id': 4604L,
  'keyword_max_cpc': '175000',
  'keyword_url': 'http://qwobl.com/SNIP
0f9e8%26sid%3Dqwobl_google_3019dkw=x',
  'match_type': 'http://sem.rdf.qwobl.com/
matchtype/phrase#phrase'},
  'race ny tickets': {'keyword_id': 4622L,
  'keyword_max_cpc': '245000',
  'keyword_url': 'http://qwobl.com/
SNIP',
  'match_type': 'http://
sem.rdf.qwobl.com/matchtype/phrase#phrase'}
}
=END DICT

_criterion_service is defined like this:
===BEGIN CODE
self._apiclient = Client(path=config.google.pickle_path)
self._criterion_service = self._apiclient.GetCriterionService
('https://sandbox.google.com')
===END CODE

Thanks for your help!

-Travis

On Nov 16, 11:06 am, AdWords API Advisor
adwordsapiadvi...@google.com wrote:
 Hi Travis,

 Are you using a client library for these requests?  If so, which
 language and version?  What does the code look like that leads to this
 error?

 Best,
 - Eric Koleda, AdWords API Team

 On Nov 13, 10:22 am, Travis B briggs.tra...@gmail.com wrote:

  Hi,

  I'm trying to set negative criteria for an adgroup (along with non-
  negative ones) in a call to CriterionService.AddCriteria. I get the
  following error message:

  aw_api.Errors.ValidationError: Given API version, v13, is not
  compatible with 'Phrase' class.

  However the error appears for every value of Keyword type ('Broad',
  'Phrase' and 'Exact'). Can I simply not set ad group negative criteria
  in version 13 of the API?

  Thanks,
  -Travis

--

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-...@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=.




AdWords API Re: AdGroup negative criteria with v13

2009-11-17 Thread Travis B
Hi Eric,

That was it! Thanks so much for your extremely valuable help. I really
appreciate it.

-Travis

On Nov 17, 1:57 pm, AdWords API Advisor adwordsapiadvi...@google.com
wrote:
 Hi Travis,

 This error is being generated by the library, and the cause appears to
 be a missing criterionType field on your keywords ( 
 seehttp://code.google.com/apis/adwords/docs/developer/Keyword.html#crite...
 ).  This is a required field of the criterion and must be set.

 Best,
 - Eric Koleda, AdWords API Team

 On Nov 17, 10:44 am, Travis B briggs.tra...@gmail.com wrote:

  Hi Eric,

  I am using awapi_python_lib_7.2.0 for python. It works fine for
  posting keywords where I don't set 'negative': True.

  The method looks like this
  BEGIN CODE
      def add_keywords(self, ad_group_id, keyword_list, match_type):
          neg_criteria = []
          print match_type
          if match_type == mt_broad:
              one_type = 'Broad'
              neg_criteria.extend([{'negative': True,
                                    'adGroupId':ad_group_id,
                                    'text':x,
                                    'type':'Phrase'} for x in
  keyword_list.keys()])
              neg_criteria.extend([{'negative': True,
                                    'adGroupId':ad_group_id,
                                    'text':x,
                                    'type':'Exact'} for x in
  keyword_list.keys()])
          elif match_type == mt_phrase:
              one_type = 'Phrase'
              neg_criteria.extend([{'negative': True,
                                    'adGroupId':ad_group_id,
                                    'text':x,
                                    'type':'Exact'} for x in
  keyword_list.keys()])
          elif match_type == mt_exact:
              one_type = 'Exact'

          criteria = [{'adGroupId':ad_group_id,
                       'criterionType':'Keyword',
                       'destinationUrl':v['keyword_url'],
                       'maxCpc': str(round_micro_to_cent(v
  ['keyword_max_cpc'])),
                       'text':x,
                       'type':one_type,
                       } for x,v in keyword_list.items()]
          criteria.extend(neg_criteria)
          res = self._criterion_service.AddCriteria(criteria)

          return res
  ==END CODE

  keyword_list is a dictionary that looks something like this:
  =BEGIN DICT
  {
                'race ny': {'keyword_id': 4604L,
                            'keyword_max_cpc': '175000',
                            'keyword_url': 'http://qwobl.com/SNIP
  0f9e8%26sid%3Dqwobl_google_3019dkw=x',
                            'match_type': 'http://sem.rdf.qwobl.com/
  matchtype/phrase#phrase'},
                'race ny tickets': {'keyword_id': 4622L,
                                    'keyword_max_cpc': '245000',
                                    'keyword_url': 'http://qwobl.com/
  SNIP',
                                    'match_type': 'http://
  sem.rdf.qwobl.com/matchtype/phrase#phrase'}}

  =END DICT

  _criterion_service is defined like this:
  ===BEGIN CODE
          self._apiclient = Client(path=config.google.pickle_path)
          self._criterion_service = self._apiclient.GetCriterionService
  ('https://sandbox.google.com')
  ===END CODE

  Thanks for your help!

  -Travis

  On Nov 16, 11:06 am, AdWords API Advisor

  adwordsapiadvi...@google.com wrote:
   Hi Travis,

   Are you using a client library for these requests?  If so, which
   language and version?  What does the code look like that leads to this
   error?

   Best,
   - Eric Koleda, AdWords API Team

   On Nov 13, 10:22 am, Travis B briggs.tra...@gmail.com wrote:

Hi,

I'm trying to set negative criteria for an adgroup (along with non-
negative ones) in a call to CriterionService.AddCriteria. I get the
following error message:

aw_api.Errors.ValidationError: Given API version, v13, is not
compatible with 'Phrase' class.

However the error appears for every value of Keyword type ('Broad',
'Phrase' and 'Exact'). Can I simply not set ad group negative criteria
in version 13 of the API?

Thanks,
-Travis

--

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-...@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=.




AdWords API AdGroup negative criteria with v13

2009-11-13 Thread Travis B
Hi,

I'm trying to set negative criteria for an adgroup (along with non-
negative ones) in a call to CriterionService.AddCriteria. I get the
following error message:

aw_api.Errors.ValidationError: Given API version, v13, is not
compatible with 'Phrase' class.

However the error appears for every value of Keyword type ('Broad',
'Phrase' and 'Exact'). Can I simply not set ad group negative criteria
in version 13 of the API?

Thanks,
-Travis

--

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-...@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=.




AdWords API Re: v13 Problem setting networkTargeting in python using SOAPpy

2009-11-12 Thread Travis B
Hi Eric,

So I've installed the python library, and I'm having trouble doing a
basic 'getAllAdWordsCampaigns' request against the sandbox. I'm having
trouble getting up and running with the library. I have a feeling I'm
not using it 100% correctly, but I based what I could off the sample
code.

I've got ZSI and PyXML installed on the system.

Bring on the sample code!
BEGIN SAMPLE CODE
from qwobl_ads import config as ad_config

from aw_api.Client import Client

class GoogleAWAClient(object):
def __init__(self, email):
self._email = email
headers = {
  'email': self._email,
  'password': ad_config.google.password,
  'clientCustomerId': 'Unknown',
  'userAgent': ad_config.google.user_agent,
  'developerToken': ad_config.google.developer_token,
  'applicationToken': ad_config.google.application_token,
  'validateOnly': 'n'
}

if(ad_config.google.version == 'sandbox'):
headers['clientEmail'] = 'client_1+' + self._email,

self.client = Client(headers=headers)

if __name__ == '__main__':
gc = GoogleAWAClient('q...@qwobl.com')
dummy = {'dummy': 0}
gc.client.CallMethod('https://sandbox.google.com/api/adwords/v13/
CampaignService',
 'getAllAdWordsCampaigns', (dummy,), None)
END SAMPLE CODE

And the error I get is:

Traceback (most recent call last):
  File aw_api_test.py, line 27, in module
'getAllAdWordsCampaigns', (dummy,), None)
  File /home/briggs/lib/python/aw_api/Client.py, line 601, in
CallMethod
request)
  File aw_api/WebService.py, line 330, in CallMethod
aw_api.Errors.Error/home/briggs/lib/python/aw_api/Errors.py:34:
DeprecationWarning: BaseException.message has been deprecated as of
Python 2.6
  return str(self.message)
: 'tuple' object has no attribute 'find'


On Nov 11, 6:56 pm, AdWords API Advisor adwordsapiadvi...@google.com
wrote:
 Hi Travis,

 The short answer is that SOAPpy isn't readily compatible with the
 AdWords API web services.  Our web services are Document/Literal and
 SOAPpy only support RPC/Encoded web services.  It is possible to get
 SOAPpy to a compatible format, but it takes a lot of manual
 manipulation of the requests.  The official AdWords API Python client
 library has this functionality built in, and we recommend you use the
 library instead of raw SOAPpy requests.

  http://code.google.com/p/google-api-adwords-python-lib/

 Best,
 - Eric Koleda, AdWords API Team

 On Nov 11, 3:44 pm, Travis B briggs.tra...@gmail.com wrote: Hi folks,

  I can't seem to set the networkTargeting field using an updateCampaign
  call on CampaignService. I'm using the SOAPpy framework in python.

  The WSDL shows that geoTargeting is a complexType, just like
  networkTargeting, however I am able to set the later simply using
  dictionaries.

  Any help is appreciated.

  Here's some sample code that reproduces the problem:
  BEGIN ADWORDS SAMPLE CODE
  import SOAPpy
  from conf import config_dict

  headers = SOAPpy.Types.headerType()

  headers.email = config_dict['email']
  headers.password = config_dict['password']
  headers.useragent = config_dict['useragent']
  headers.developerToken = config_dict['developerToken']
  headers.applicationToken = config_dict['applicationToken']
  headers.clientEmail = config_dict['clientEmail']

  camp_service = SOAPpy.SOAPProxy('https://sandbox.google.com/api/
  adwords/v13/CampaignService', header=headers)
  camp_service.config.debug = 0

  camp_service.getAllAdWordsCampaigns(0)
  print camp_service.updateCampaign({'id': 1938, 'geoTargeting':
  {'regionTargets': {'regions': ['US-CA']}}})
  print camp_service.updateCampaign({'id': 1938, 'networkTargeting':
  ['SearchNetwork']})
  END ADWORDS SAMPLE CODE

  As shown, the second line produces:

  SOAPpy.Types.faultType: Fault soapenv:Server.userException:
  java.lang.IllegalArgumentException: Can not set
  com.google.ads.netapi.services.datamodel.NetworkTarget field
  com.google.ads.netapi.services.campaign.CampaignData.networkTargeting
  to [Ljava.lang.String;: SOAPpy.Types.structType detail at
  17938624: ...

  If I change the second call to:
  print camp_service.updateCampaign({'id': 1938, 'networkTargeting':
  {'networkTypes': ['SearchNetwork']}})

  I get:
  SOAPpy.Types.faultType: Fault soapenv:Server.userException:
  java.lang.IllegalArgumentException: Can not set
  [Lcom.google.ads.netapi.services.datamodel.NetworkType; field
  com.google.ads.netapi.services.datamodel.NetworkTarget.networkTypes to
  [Ljava.lang.String;: SOAPpy.Types.structType detail at
  14784704: 

  -Travis

--

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-...@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=.




AdWords API v13 Problem setting networkTargeting in python using SOAPpy

2009-11-11 Thread Travis B
Hi folks,

I can't seem to set the networkTargeting field using an updateCampaign
call on CampaignService. I'm using the SOAPpy framework in python.

The WSDL shows that geoTargeting is a complexType, just like
networkTargeting, however I am able to set the later simply using
dictionaries.

Any help is appreciated.

Here's some sample code that reproduces the problem:
BEGIN ADWORDS SAMPLE CODE
import SOAPpy
from conf import config_dict

headers = SOAPpy.Types.headerType()

headers.email = config_dict['email']
headers.password = config_dict['password']
headers.useragent = config_dict['useragent']
headers.developerToken = config_dict['developerToken']
headers.applicationToken = config_dict['applicationToken']
headers.clientEmail = config_dict['clientEmail']

camp_service = SOAPpy.SOAPProxy('https://sandbox.google.com/api/
adwords/v13/CampaignService', header=headers)
camp_service.config.debug = 0

camp_service.getAllAdWordsCampaigns(0)
print camp_service.updateCampaign({'id': 1938, 'geoTargeting':
{'regionTargets': {'regions': ['US-CA']}}})
print camp_service.updateCampaign({'id': 1938, 'networkTargeting':
['SearchNetwork']})
END ADWORDS SAMPLE CODE


As shown, the second line produces:

SOAPpy.Types.faultType: Fault soapenv:Server.userException:
java.lang.IllegalArgumentException: Can not set
com.google.ads.netapi.services.datamodel.NetworkTarget field
com.google.ads.netapi.services.campaign.CampaignData.networkTargeting
to [Ljava.lang.String;: SOAPpy.Types.structType detail at
17938624: ...


If I change the second call to:
print camp_service.updateCampaign({'id': 1938, 'networkTargeting':
{'networkTypes': ['SearchNetwork']}})

I get:
SOAPpy.Types.faultType: Fault soapenv:Server.userException:
java.lang.IllegalArgumentException: Can not set
[Lcom.google.ads.netapi.services.datamodel.NetworkType; field
com.google.ads.netapi.services.datamodel.NetworkTarget.networkTypes to
[Ljava.lang.String;: SOAPpy.Types.structType detail at
14784704: 

-Travis

--

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-...@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=.