Google Spreadsheet service Using OAuth 2.0 - C#

微笑、不失礼 提交于 2020-01-05 02:58:22

问题


I'm facing an issue with Google Spreadsheet service. Previously I used below code to call my spreadsheet then retrieve data and save into 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
}

Once google disable OAuth1.0 I got 404 error." Previously I used this method.

I already have project in Google Console And I created my client Id as service account .

How Can I modify my code ?

I have to use google spreedsheet service of r my task.

Appreciate your answers/ feedback's

来源:https://stackoverflow.com/questions/30530455/google-spreadsheet-service-using-oauth-2-0-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!