c#中的Google网站管理员工具API

use*_*249 9 .net c# api webservice-client google-webmaster-tools

我想在c#应用程序中使用Google Webmaster Tool API.我浏览了https://developers.google.com上提供的各种文档.不幸的是,我没有得到任何使用.Net的Google WT API的工作示例.我也看过"客户端库"(" https://developers.google.com/gdata/docs/client-libraries ").

任何人都可以向我提供有关如何在c#中使用Google网站管理员工具API的任何实际示例吗?

我在Google WT上有帐号,想要下载.CSV报告"CrawlErrors","InternalLinks","TopSearchQueries"等.

谢谢

nos*_*tio 6

在这里,您可以找到网站管理员工具数据API官方C#库源代码:http:
//google-gdata.googlecode.com/svn/trunk/clients/cs/src/webmastertools/

在这里,您可以找到单元测试形式的使用示例:http:
//google-gdata.googlecode.com/svn/trunk/clients/cs/src/unittests/webmastertools/

更具体地说,身份验证,QuerySites,QuerySitemaps,QueryKeywords等示例:http:
//google-gdata.googlecode.com/svn/trunk/clients/cs/src/unittests/webmastertools/WebmasterToolsServiceTest.cs

另请注意,有一些错误报告,您的里程可能会有所不同:http: //productforums.google.com/forum/#!topic /webmasters/gh7vCzYfm6A

如果您仍在使用403 Forbidden,原因可能是您的Google帐户上安装了两步验证.如果是这种情况,请尝试在您的Google帐户的特定应用程序的密码部分生成专用密码,并将其用于GDataCredentials(this.userName, this.passWord).

或者,您可以尝试在https://www.google.com/webmasters/tools/user-admin添加子帐户并使用其中一个.该两步验证的关注可以向这些帐户,太.