Greetings to all of you.
I have This code working fine to connect to Google sheets API from WPF (Desktop Application C# ) application.
My question: Is it possible to modify it to work in .net Maui application( Application Mobile , Desktop C#)
My code:
//connection Google sheets API
string[] Scopes = { SheetsService.Scope.Spreadsheets };
var service = new SheetsService(new BaseClientService.Initializer() { HttpClientInitializer = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = " My Client ID", ClientSecret = "My Client secret" }, Scopes, "user", CancellationToken.None, new FileDataStore("MyAppsToken")).Result, ApplicationName = " My Application ", });
var values = service.Spreadsheets.Values.Get("My Spread Sheets ID", $"{"My sheet Name"}!A:C").Execute().Values;
I've tried changing the settings Google console from Application Desktop to web application , but to no avail.