Re: [perl v201109] odd clientCustomerID behavior in sandbox with add_campaign.pl?

2011-12-13 Thread Anash P. Oommen
Hi,

This behaviour is documented here: 
http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/adwords.properties.
 
I believe the reasoning here is that there are 2 different keys to identify 
a client account - clientEmail and clientCustomerId. Some libraries like 
PHP and Perl decided to use a single key (clientId) to hold both values, 
whereas others like .NET decided to keep things as 2 different keys and 
expect the user to comment out what is not required.

Hope this helps. Let me know if you have more questions.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

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


[perl v201109] odd clientCustomerID behavior in sandbox with add_campaign.pl?

2011-12-13 Thread Ovid
Short issue description: When I run examples/v201109/add_campaign.pl
with a valid clientCustomerId in my .properties file, it fails with
ADD_OPERATION_NOT_PERMITTED. When I change clientCustomerId to
clientId a valid clientCustomerId header is added to the SOAP request
and the operation succeeds.

It seems odd that the other .properties keys are set as headers with
the same name as the key (e.g., authToken, userAgent, developerToken),
but this key gets rewritten from clientId to clientCustomerId. Is this
documented?

The longer version is below.

Cheers,
Ovid

When I run examples/v201109/add_campaign.pl, I get the following
error:

[OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @
operations[0]]

The code is unchanged except for the constructor:

my $client = Google::Ads::AdWords::Client->new({
version => "v201109",
properties_file => 't/data/sandbox.properties',
});

My sandbox.properties looks like this:

 
clientCustomerId=REDACTED
userAgent=REDACTED
developerToken=REDACTED
authToken=REDACTED
alternateUrl=https://adwords-sandbox.google.com

It appears that this is because the clientCustomerID header is not
being propagated:

  
https://adwords.google.com/api/adwords/cm/
v201109">
  https://adwords.google.com/api/adwords/cm/
v201109">REDACTED
  https://adwords.google.com/api/adwords/cm/
v201109">REDACTED
  https://adwords.google.com/api/adwords/cm/
v201109">AwApi-Perl-2.5.1|weborama
  https://adwords.google.com/api/adwords/cm/
v201109">false
  https://adwords.google.com/api/adwords/cm/
v201109">false

  

Dumping the client object shows show that internally, I have an
undefined client_id, but there's no mention of a client_customer_id or
anything similar.

If I change the clientCustomerId to clientId in the sandbox.properties
file:

 
clientId=REDACTED

And rerun my code, I get the following:

Campaign with name "Interplanetary Cruise #1323771624" and id
"518102" was added.

And the SOAP headers have a clientCustomerId instead of a clientId.

  
https://adwords.google.com/api/adwords/cm/
v201109">
  https://adwords.google.com/api/adwords/cm/
v201109">REDACTED
  https://adwords.google.com/api/adwords/
cm/v201109">3465273689 
  https://adwords.google.com/api/adwords/cm/
v201109">REDACTED
  https://adwords.google.com/api/adwords/cm/
v201109">AwApi-Perl-2.5.1|weborama
  https://adwords.google.com/api/adwords/cm/
v201109">false
  https://adwords.google.com/api/adwords/cm/
v201109">false

  

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