Google api Google Drive API+C ASP.net MVC

Google api Google Drive API+C ASP.net MVC,google-api,Google Api,任何人都可以分享一个C ASP.Net MVC应用程序的工作示例,该应用程序是从服务器访问的,而不是访问位于域的Google驱动器上的文件的本地主机 我对这种访问使用哪种类型的客户机id和用于它的不同流感到困惑 我可以使用本机客户端id访问文件,但它在服务器上不起作用,请停留在以下行- UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync( new ClientSecrets

任何人都可以分享一个C ASP.Net MVC应用程序的工作示例,该应用程序是从服务器访问的,而不是访问位于域的Google驱动器上的文件的本地主机

我对这种访问使用哪种类型的客户机id和用于它的不同流感到困惑

我可以使用本机客户端id访问文件,但它在服务器上不起作用,请停留在以下行-

 UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
            new ClientSecrets
            {
                ClientId = gdocsHelper.ClientId,
                ClientSecret = gdocsHelper.ClientSecret,
            },
            new[] { DriveService.Scope.Drive },
            "user",
            CancellationToken.None).Result;
请引导我完成这件事