【问题标题】:How to get Yahoo Gemini Publisher API reports?如何获取 Yahoo Gemini Publisher API 报告?
【发布时间】:2017-08-04 21:56:08
【问题描述】:

当我登录 Yahoo Gemini Publisher 仪表板(位于 https://gemini.yahoo.com/publisher)时,我可以看到我已配置的 Publisher ID 的报告。我现在正尝试从 Gemini REST API 获取相同的数据,但遇到了一些混乱和错误。

根据https://developer.yahoo.com/gemini-publishers/docs/gemini-publisher-reporting.html,我需要获得一个OAuth2 访问令牌(我可以通过https://api.login.yahoo.com/oauth2/request_auth?client_id=GEMINI_CONSUMER_KEY&redirect_uri=MY_URL&response_type=token&language=en-us 浏览器重定向成功完成)并调用https://api.admanager.yahoo.com/v1/rest/reports/publisher/ 以获取报告。但是,当我这样做时,我得到了一个神秘的回应:

curl --request POST \
  --url http://api.admanager.yahoo.com/v1/rest/reports/publisher/ \
  --header 'accept: application/json' \
  --header 'authorization: Bearer [omitted]' \
  --header 'content-type: application/json' \
  --data '{ ... cube JSON stuff ... }'

{"error":{"lang":"en-US","description":"Please provide valid credentials. OAuth oauth_problem=\"additional_authorization_required\", realm=\"yahooapis.com\""}}

OAuth 令牌被授予对 Gemini API 的访问权限。我尝试通过显式和隐式方法获取 OAuth 令牌,结果相同。考虑到这可能是访问问题,我也增加了授予其他 API(个人资料、联系人等)的权限,但没有更改。

我注意到https://developer.yahoo.com/gemini/ 上列出了一组单独的 Gemini API。这些 API 位于https://api.gemini.yahoo.com/v2/rest/reports/custom/,当我向它们发布时,它接受我的 OAuth 令牌,但是这些 API 的“多维数据集”需要一个“广告商 ID”,我不确定从哪里获得或者我是否使用了正确的API。

{
"errors": [
    {
        "errIndex": -1,
        "code": "E40000_INVALID_INPUT",
        "message": "Entity (publisher or advertiser id) not available",
        "description": ""
    }
],
"response": { ... }
}

该消息似乎表明我可以传递发布者 ID,但是当我将其包含在“过滤器”中时它不起作用。

当我尝试致电 https://api.gemini.yahoo.com/v2/rest/advertiser/ 时,我没有收到任何广告商的回复。

我应该使用哪个 API?如果是https://api.admanager.yahoo.com/v1/rest/reports/publisher/,那么我是省略了一些必需的请求数据还是我得到了错误的令牌?如果我应该使用https://api.gemini.yahoo.com/v2/rest/reports/custom/,那么如何获取发布商数据(或我的“广告商 ID”)?

【问题讨论】:

    标签: yahoo-api yahoo-oauth


    【解决方案1】:

    显然,Yahoo 已弃用 Gemini 发布 API,并将此功能移至 Flurry(其 API 需要不同的身份验证)。 https://developer.yahoo.com/flurry/docs/api/code/publishing/

    【讨论】:

    • Flurry 仅适用于移动设备。 Gemini 仍在维护中,目前处于 V3 版本。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-11
    • 1970-01-01
    • 2011-11-08
    • 2011-10-27
    • 2017-04-27
    • 2019-09-09
    相关资源
    最近更新 更多