Below C# code should work for non-mcc account. It uses the V13 libs to make
it happen. This is not production code btw, so make sure to do your
testing... (let us know too if you find scenarios where it bombs)

*Libs to include:*
using Google.Api.Ads.AdWords.Lib;
using Google.Api.Ads.AdWords.v201101;
using Google.Api.Ads.AdWords.v13;

*Code:*
AdWordsUser user =
GoogleAdWordsCustomUserHelper.GetCustomerGoogleAdWordsUser(#GoogleAdWordsEmail#,
#GoogleAdWordsPassword#);

// v13
AccountService service =
(AccountService)user.GetService(AdWordsService.v13.AccountService);
AccountInfo ai = service.getAccountInfo();

try
{
   string accountId = ai.customerId.ToString();
}
...

yagmur

On Tue, Sep 6, 2011 at 10:34 PM, timp <timprepsc...@gmail.com> wrote:

> Just for people searching.
>
> When you ask for ServicedAccountService of a non-mcc, you get -1 back.
>
> -tim
>
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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
>

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

Reply via email to