0
Answer

Authentication request returned unexpected result: 404

NJ  Bhanushali

NJ Bhanushali

9y
478
1
 Following is a code to get google contacts.
It was working fine but since few days I m getting exception of "Authentication request returned unexpected result: 404".
 
using Google.GData.Client;
using Google.Contacts;
using Google.GData.Extensions;

private void FetchContactList()
{
     List<string> lstContacts = new List<string>();
     RequestSettings rsLoginInfo = new RequestSettings("my application", "[email protected]", "XXXXXX");
     rsLoginInfo.AutoPaging = true;

     ContactsRequest cRequest = new ContactsRequest(rsLoginInfo);
     Feed<contact> feedContacts = cRequest.GetContacts();
    foreach (Contact gmailAddresses in feedContacts.Entries)
    {
        // Looping to read email addresses
         foreach (EMail emailId in gmailAddresses.Emails)
        {
             lstContacts.Add(emailId.Address);
        }
    }
   GridView1.DataSource = lstContacts;
   GridView1.DataBind();
}

Is google change something from their side?
Please suggest my to solve this problem.