Reusing Google API credentials in GData API -


I'm trying to create a web application ASP.NET MVC 5 with which I authenticate the user with a Google Account And then read data from your spreadsheets stored in Google Drive / Google Sheets.

I am using Google APIs to authenticate the user. After successfully validating a user, I get back credentials from Google in an object that is Google.Apis Auth.OAuth2.Web AuthResult.UAuth2.Web AuthResult.UserCredential is

I

var driveService = new DriveService (new BaseClientService.Initializer {HttpClientInitializer = result Credential, ApplicationName = "Asp.NET MVC Sample"} to successfully index a list of files using the same code Make service.);

Now, I want to use the GData API to read content from spreadsheets in the drive. To work for this, I need the spreadsheets service object and then set the RequestFactory parameter for an example of GOAuth2RequestFactory and its Change OAuth2 is required Class OAuth2Parameters .

For example how can I reuse certificates obtained using the Google API in the GDAT API specified parameter?

I am already doing this,

How do I pass a GDita token

That is, I use a single OAuth2 access / fresh token set. Using the same token for both gdata calls & amp; Call Drive API.


Comments