Google Spreadsheet Service using OAuth 2.0 - C #

I'm having a problem with the Google Spreadsheet service. Previously, I used below code to call my table and then fetch the data and store it in my local database.

SpreadsheetsService service = new SpreadsheetsService("MySpreadSheet");
service.setUserCredentials(userName, password);


string token = service.QueryClientLoginToken(); // Now 404 error
SpreadsheetQuery query = new SpreadsheetQuery();
SpreadsheetFeed feed = service.Query(query);

foreach (SpreadsheetEntry spreadsheet in feed.Entries){
// Retrieve data and save into my local machng
}

      

As soon as google turned off OAuth1.0 , I got a 404 error. "I used this method before .

I already have a project in Google Console AND I created my Client ID as a service account.

How can I change the code?

I need to use google spreedsheet service for my task.

Rate your responses / reviews

+3


source to share





All Articles