【问题标题】:Google Webmaster Tools API: Downloading queries via OAUTH2Google Webmaster Tools API:通过 OAUTH2 下载查询
【发布时间】:2013-04-22 21:37:29
【问题描述】:

我正在尝试使用 Google 的网站管理员工具 API 下载最近搜索查询的 CSV 文件。

我知道如何使用他们在http://googlewebmastercentral.blogspot.com/2011/12/download-search-queries-data-using.html 的 Python 示例来做到这一点

但我想使用 OAUTH2。

问题出在:CSV 下载的下载地址是:

/webmasters/tools/downloads-list?hl=%s&siteUrl=%s

但 Google 数据 API 只允许我使用 OAUTH2 来对付: /webmasters/tools/feeds/sites/

所以我在验证时获得的令牌不提供访问权限。

他们可以通过 OAUTH2 获得一些数据,而其中一些只使用用户名/密码,这似乎很疯狂。

有人知道我可以用来通过 OAUTH2 下载查询报告的请求 URI 吗?还是这个 API 看起来很疯狂?

【问题讨论】:

    标签: google-search-console


    【解决方案1】:

    我的 $.02 会是“是的,它看起来很疯狂。”

    如果您查看 Google API 控制台 (https://code.google.com/apis/console),Webmaster Tools API 明显不存在。

    我试图走同样的路,将 OATH2 用于 GWT API,但无法使其工作。使用“基本身份验证”是唯一的解决方案。

    2015 年 4 月编辑:基本身份验证已被 Google 撤销且不再有效

    【讨论】:

    【解决方案2】:

    我刚碰到这个,我觉得用OAuth2应该是可以的,对应这句话:

    在 Google API 控制台的“服务”窗格中激活 Google Site Verification API。 (如果控制台中没有列出,则跳过此步骤。)

    https://developers.google.com/site-verification/v1/getting_started

    【讨论】:

    • 站点验证 API 与 Google Webmaster Tools API 不同。
    猜你喜欢
    • 1970-01-01
    • 2013-07-14
    • 2015-03-30
    • 1970-01-01
    • 2013-01-02
    • 2021-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多