【问题标题】:Problems creating new query DoubleClick Bid Manager - Python创建新查询时出现问题 DoubleClick Bid Manager - Python
【发布时间】:2020-02-25 21:14:58
【问题描述】:
dict = {
    "kind": "doubleclickbidmanager#query",
    "metadata": {
        "dataRange": "LAST_30_DAYS",
        "format": "CSV",
        "title": "test API"
    },
    "params": {
        "filters": [
        {
            "type": "FILTER_PARTNER",
            "value": "Nestle (GCC&Levant)_PM MENA (2410734)"
        }
        ],
        "metrics": [
        "METRIC_CLICKS",
        "METRIC_UNIQUE_REACH_CLICK_REACH",
        "METRIC_UNIQUE_REACH_IMPRESSION_REACH"
        ]
    }
}

r = requests.post('https://www.googleapis.com/doubleclickbidmanager/v1.1/query',data = dict)

这是我正在尝试使用的代码,用于为 google 投标管理器上的离线报告创建查询。 它给了我以下错误

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "required",
    "message": "Login Required",
    "locationType": "header",
    "location": "Authorization"
   }
  ],
  "code": 401,
  "message": "Login Required"
 }
}

我尝试了不同的方法,甚至尝试使用请求类型调用并将授权密钥放入 API 调用中,但它不起作用。任何人都可以确认肯定缺少某些东西吗?

【问题讨论】:

    标签: python google-apis-explorer google-ad-manager


    【解决方案1】:

    您可以按照这些python示例进行登录:https://github.com/googleads/googleads-bidmanager-examples/tree/master/python

    不过不管怎样,登录后总是有问题,我在下面再发一个问题:HttpEroor 500 Backend Error and HttpError 403 using DoubleClick Bid Manager API in python

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-09
      相关资源
      最近更新 更多