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