0
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)

This is the code i am trying to use for creating Query for offline report on google bid manager. It give me following error

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

I have tried different ways even tried using the request type call and put the authorization keys in the API call but it didn't work. Surely something is missing can anyone confirm?

Mueez Ahmad
  • 33
  • 1
  • 5

1 Answers1

0

You can follow these python exemples for login :https://github.com/googleads/googleads-bidmanager-examples/tree/master/python

But anyway, there is always something wrong after the login, i post another question below : HttpEroor 500 Backend Error and HttpError 403 using DoubleClick Bid Manager API in python

AAAn1ta
  • 31
  • 3