You need to specify which user to access data for.  You need to create an 
AdwordsSession object.  Check the example Java code here on how to do this:

http://code.google.com/p/google-api-ads-java/source/browse/#git%2Fexamples%2Fadwords_axis%2Fsrc%2Fmain%2Fjava%2Fadwords%2Faxis%2Fv201302%2Faccountmanagement

Oliver

On Thursday, May 16, 2013 12:22:38 PM UTC+1, Sam wrote:
>
> I am using google adwords api to get all accounts, I am getting The 
> request failed with HTTP status 404: Not Found., on this line :
>
> ManagedCustomerPage page = managedCustomerService.get(selector);
>
> When searching found out need to use latest service, but as you can see I 
> am using v201302, can someone please point me to right direction.
>
> Here is my code:
>
>  static AdWordsUser user;
>
>         public void GetAccounts()
>         {
>             user = new AdWordsUser();
>             ManagedCustomerService managedCustomerService = 
> (ManagedCustomerService)user.GetService(AdWordsService.v201302.ManagedCustomerService);
>
>             //create a selector
>             Selector selector = new Selector();
>             selector.fields = new string[] { "Login", "CustomerId", "Name" };
>
>             //get all campaigns
>             ManagedCustomerPage page = managedCustomerService.get(selector);
>
>             //Display all Campaigns
>             if (page != null && page.entries != null && page.entries.Length > 
> 0)
>             {
>                 foreach (ManagedCustomer mc in page.entries)
>                 {
>                     string s = string.Format("campaign with id = '{0}', name 
> = '{1}', and status = '{2}' was found.", mc.login, mc.customerId, mc.name);
>                 }
>             }
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to