Opening Google Docs API with username/password RRS feed

  • Question

  • User-973319413 posted


    I have developed a web application using Google Docs API.When i try to open the Document which has been uploaded in Google Docs.I need to be authenticated every time i open it.I have the url of the Document to be opened.

     DocumentsListQuery queryone = new DocumentsListQuery();
                    queryone.Title = "TeamLeaderJobDescription";
                    queryone.TitleExact = false;
                    DocumentsFeed feedone = service.Query(queryone);
                    foreach (DocumentEntry entrytwo in feedone.Entries)
                        string ashvinero = entrytwo.AlternateUri.ToString();
                        DocumentsService client = new DocumentsService(entrytwo.AlternateUri.ToString());
                        client.setUserCredentials("myaccount@gmail.com", "mypassword");
    Here the line process.start will open the document in Google docs.But i need to enter the username/password here.Is there a way so that i can bypass asking username/password.

    Can someonehere help me out with this

    Thanks in Advance

    Tuesday, July 20, 2010 6:57 AM

All replies

  • User1945922531 posted

    Should you create only one instance of DocumentsService (out the loop).. and put usernaem and password only once ?

    it everyhting depends on how Google API handles it and how your classes are implemented 

    Tuesday, July 20, 2010 7:39 AM