i am using the code like that..........
when i run i get invalid cradentials exception.canany one help me
private void button1_Click(object sender, EventArgs e)
{
domain = textBox3.Text;
adminEmail = textBox1.Text;
adminPassword = textBox2.Text;
emailList = textBox5.Text;
service = new EmailListService("apps-" + domain);
service.setUserCredentials(adminEmail, adminPassword);
((GDataGAuthRequestFactory)service.RequestFactory).CaptchaToken =
token;
((GDataGAuthRequestFactory)service.RequestFactory).CaptchaAnswer =
textBox6.Text ;
((GDataRequestFactory)service.RequestFactory).KeepAlive =
false;
//Uri uri = new Uri("https://www.google.com/accounts/
ClientLogin");
//service.Query(uri);
try
{
EmailListEntry insertedEntry =
CreateEmailList("alvi");
MessageBox.Show(insertedEntry.EmailList.Name);
}
catch (InvalidCredentialsException ic)
{
MessageBox.Show("Exception: " + ic.Message + "\n" +
ic.StackTrace);
}
catch (CaptchaRequiredException c)
{
MessageBox.Show("Invalid Captcha entered");
showimg(c.Url, c.Token);
url = c.Url;
token = c.Token;
}
catch (Exception exc)
{
MessageBox.Show("Exception: " + exc.Message + "\n" +
exc.InnerException + "\n" + exc.Message + "\n" + exc.StackTrace);
}
}
public EmailListEntry CreateEmailList(string emailList)
{
EmailListQuery query = new EmailListQuery(domain);
EmailListEntry entry = new EmailListEntry(emailList);
return service.Insert(query.Uri, entry);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Data API" 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/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---