Yep.  That was it.  All I had to do was setClientCustomerId on the 
AdWordsSession.

I'm back in business again!

Thanks Josh.



On Monday, March 31, 2014 1:59:06 PM UTC-7, Josh Radcliff (AdWords API 
Team) wrote:

> Hi,
>
> From the behavior you are describing it sounds like you are passing an MCC 
> customer ID in the *clientCustomerId* header.  For the CampaignService 
> you'll want to specify a regular AdWords customer ID by either updating 
> your ads.properties file or calling setClientCustomerId on your 
> AdWordsSession.
>
> If you are migrating to OAuth2, please also check how you are constructing 
> your AdWordsSession.  You'll want to pass an OAuth *Credential *to the 
> AdWordsSession builder, similar to our 
> GetCampaigns.java<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201402/basicoperations/GetCampaigns.java>
>  example.
>
> Cheers,
> Josh, AdWords API Team
>
> On Monday, March 31, 2014 2:06:23 PM UTC-4, New Day Consulting wrote:
>>
>> I am a java developer transitioning to AdWords API v201402 from v201306.
>>
>> I have generated an oAuth2Credential via the OfflineCredentialsBuilder() 
>> as suggested as a replacement for getting oAuth2 authorization via a 
>> private key file (a *.p12" file)
>> and an email and password in an ads.properties file.
>>
>> The oAuth2Credential and tokenRefresh works fine when I use it go get 
>> Customers and Usages pages via using the following calls:
>>
>>     ManagedCustomerServiceInterface managedCustomerService =
>>         adWordsServices.get(session, 
>> ManagedCustomerServiceInterface.class);
>>
>>     // Create selector.
>>     Selector selector = new Selector();
>>     selector.setFields(new String[]{"Login", "CustomerId",  "Name", 
>> "CurrencyCode", "CanManageClients", "CompanyName"});
>>
>>     // Get results.
>>     ManagedCustomerPage page = getPage(managedCustomerService, selector);
>>
>>
>> However, the oAuth2Credential and tokenRefresh returns empty pages when I 
>> use it to get Campaigns information via the following calls:
>>
>>         CampaignServiceInterface campaignService =
>>             adWordsServices.get(session, CampaignServiceInterface.class);
>>
>>         int offset = 0;
>>
>>         SelectorBuilder builder = new SelectorBuilder();
>>         Selector selector = builder
>>                 .fields("Id", "Name")
>>                 .orderAscBy("Name")
>>                 .offset(offset)
>>                 .limit(PAGE_SIZE)
>>                 .build();
>>
>>         CampaignPage page = service.get(selector);
>>
>> The above calls *do work* fine and return all expected pages when I use 
>> the oAuth2 authorization via a private key file (a *.p12" file)
>> and an email and password in an ads.properties file.
>>
>> I would continue to use the .p12 file and email and password in an 
>> ads.properties file, but I believe that these oAuth techniques are going 
>> away soon.
>>
>> Please help.  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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to