1
嗨我想读谷歌驱动器API使用谷歌api示例的电子表格。谷歌驱动器API到C#
但我得到同样的错误:“类型‘Google.GData.Client.GDataRequestException’未处理的异常发生在Google.GData.Client.dll
附加信息:认证请求的执行返回意想不到的结果: 404“
我确定我输入了正确的登录名和密码。
这里是代码:
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
SpreadsheetsService myService = new SpreadsheetsService("exampleCo-exampleApp-1");
myService.setUserCredentials(myusername, password);
SpreadsheetQuery query = new SpreadsheetQuery();
SpreadsheetFeed feed = myService.Query(query);
Console.WriteLine("Your spreadsheets:");
foreach (SpreadsheetEntry entry in feed.Entries)
{
Console.WriteLine(entry.Title.Text);
}
}
}
能否请您分享您使用自己验证码?如果您遵循教程,则应在client_secret.json文件中注意您的身份验证。 https://developers.google.com/drive/web/quickstart/dotnet – Rivero
驱动器中的错误404通常代表未找到文件,但错误消息似乎与验证有关。 – Rivero
我更新了代码。还是一样的错误。 – Barakr