Hello Kenneth, Assuming you're using the .NET Client Library (http://code.google.com/ p/google-api-adwords-dotnet/) there's sample code illustrating the getAccountInfo() method of the AccountService in the Examples directory. Instead of calling getAccountInfo(), it should be straightforward to call getClientAccounts() on the AccountService object.
http://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/Examples/v13/AccountServiceNoConfigDemo.cs Cheers, -Jeff Posnick, AdWords API Team On Aug 14, 7:55 pm, KennethSum <ks...@sumerford7.com> wrote: > So I am supposed to use getClientAccounts from AccountService because > AdWords Sandbox cannot find > my Email account. SO WHERE IS the C# code for this? I have tried the > following: > > protected void btnSetClientAcct_Click(object sender, EventArgs e) > { > // ***** Set up Client Account > > try > { > // Provide AdWords login information. > String email ; > String password ; > String clientEmail = "INSERT_CLIENT_LOGIN_EMAIL_HERE"; > String useragent = > "INSERT_COMPANY_NAME: AdWords API DotNet Sample Code"; > String developerToken ; > String applicationToken ; > > //** Use class for Sandbox variables. > clsSandbox SandBoxV = new clsSandbox(); > email = SandBoxV.Email; > password = SandBoxV.Password; > developerToken = SandBoxV.DeveloperToken; > applicationToken = SandBoxV.ApplicationToken; > > // Set up service connection. > com.google.sandbox_AccountService.AccountService serviceAc = > new com.google.sandbox_AccountService.AccountService(); > > // Define SOAP headers. > // serviceAc.emailValue = new email(); > > // serviceAc.emailValue = new email(); > serviceAc.emailValue = new > com.google.sandbox_AccountService.email(); > //serviceAc.emailValue = new > com.google.sandbox_AccountService.email(); > serviceAc.emailValue.Text = new String[] { email }; > serviceAc.passwordValue = new > com.google.sandbox_AccountService.password(); > serviceAc.passwordValue.Text = new String[] { password }; > serviceAc.clientEmailValue = new > com.google.sandbox_AccountService.clientEmail(); > serviceAc.clientEmailValue.Text = new String[] > { clientEmail }; > serviceAc.useragentValue = new > com.google.sandbox_AccountService.useragent(); > serviceAc.useragentValue.Text = new String[] { useragent }; > serviceAc.developerTokenValue = new > com.google.sandbox_AccountService.developerToken(); > serviceAc.developerTokenValue.Text = new String[] > { developerToken }; > serviceAc.applicationTokenValue = new > com.google.sandbox_AccountService.applicationToken(); > serviceAc.applicationTokenValue.Text = new String[] > { applicationToken }; > > // Get client accounts. > String[] loginEmails = serviceAc.getClientAccounts(); > > // Display login emails. > if (loginEmails != null) > { > > [ETC.] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---