googleads / googleads-perl-lib

AdWords API Perl Client Library
Apache License 2.0
5 stars 19 forks source link

Perl Samples need client_id => "xxx-xxx-xxxx" added to run #8

Closed TyRoden closed 9 years ago

TyRoden commented 9 years ago

The sample reports do not run unless you edit the Adwords::Client->new line as shown:

my $client = Google::Ads::AdWords::Client->new({version => "v201409", client_id => "xxx-xxx-xxxx"});

Without the client_id field added (with the proper MCC or client ID) the samples fail.

The moment I add in the client_id to it, all runs fine. Just passing this along.

jradcliff commented 9 years ago

We generally try to construct the examples so they can be run without modification, so they assume that you've set clientId in your ~/adwords.properties file. There are some exceptions to this, such as examples that require an ad group ID or campaign ID.

One recent change, however, is that with v201409 you must supply a clientCustomerId header for most services (see the release notes), so you'll now get an API error if that's missing, whereas with prior versions you would just get an empty response in many cases.

Regardless, it looks like this isn't obvious from our docs, so I'll update our README to make this clear. Thanks for pointing it out!

jradcliff commented 9 years ago

In the latest release I updated the README section on examples to clarify that you should set clientId in your ~/adwords.properties file when running examples.