Search Results

Search found 1 results on 1 pages for 'prashantc'.

Page 1/1 | 1 

  • Using DotNetOpenAuth AccessToken for uploading docx file to google

    - by PrashantC
    Hi , I am using DotNetOpenAuth Package, I am trying to upload a package to google docs, Using client credentials i am able to do it successfully using following code, DocumentEntry objDocumentEntry = new DocumentEntry(); objDocumentsService.setUserCredentials(strUserName,strPassWord); string strAuthenticationToken = objDocumentsService.QueryAuthenticationToken(); objDocumentEntry = objDocumentsService.UploadDocument(Server.MapPath("test.docx"), "New Name"); I want achieve save with plain oAuth, I am having following code written for it, if (this.TokenManager != null) { if (!IsPostBack) { var google = new WebConsumer(GoogleConsumer.ServiceDescription, this.TokenManager); // Is Google calling back with authorization? var accessTokenResponse = google.ProcessUserAuthorization(); if (accessTokenResponse != null) { this.AccessToken = accessTokenResponse.AccessToken; } else if (this.AccessToken == null) { // If we don't yet have access, immediately request it. GoogleConsumer.RequestAuthorization(google, GoogleConsumer.Applications.DocumentsList); } } } I successfully get "AccessToken", But i am not sure how to use it.. Do we need to exchange this token? what excatly to do with this token? Is it a sessionToken? Please provide some inputs, I am badly stuck with this problem from last 3 days, Prashant C

    Read the article

1