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