在 python 中使用 DoubleClick Bid Manager API 的 HttpEroor 500 后端错误和 HttpError 403 [英] HttpEroor 500 Backend Error and HttpError 403 using DoubleClick Bid Manager API in python

查看:22
本文介绍了在 python 中使用 DoubleClick Bid Manager API 的 HttpEroor 500 后端错误和 HttpError 403的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建并运行一些查询,并通过 Python 中的 DoubleClick Bid Manager API 获取最新报告,遵循示例 get_last_report.py in Github 一步一步,我总是得到一个HttpError 500,比如:

I need to create and run some queries as well as get the last reports via DoubleClick Bid Manager API in python, after following the example get_last_report.py in Github step by step, I always got an HttpError 500, like:

Traceback (most recent call last):
  File "dbm.py", line 202, in <module>
    main(util.setup(args), args.output_directory, QUERY_ID, args.report_window)
  File "dbm.py", line 154, in main
    response = doubleclick_bid_manager.queries().listqueries().execute()
  File "//anaconda3/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "//anaconda3/lib/python3.7/site-packages/googleapiclient/http.py", line 856, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 500 when requesting https://www.googleapis.com/doubleclickbidmanager/v1.1/queries?alt=json returned "Backend Error">

此外,当我尝试运行示例时 download_line_items.py,我收到另一个错误 HttpError 403:

Also when I tried to run the example download_line_items.py, I got another error HttpError 403:

Traceback (most recent call last):
  File "download_LI.py", line 81, in <module>
    main(util.setup(args), path, request_body)
  File "download_LI.py", line 57, in main
    handler.write(request.execute()['lineItems'].encode('utf-8'))
  File "//anaconda3/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "//anaconda3/lib/python3.7/site-packages/googleapiclient/http.py", line 856, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/doubleclickbidmanager/v1.1/lineitems/downloadlineitems?alt=json returned "You are not authorized to use DoubleClick Bid Manager API. Please contact dbm-support@google.com.">

我已经尝试了不同的客户端机密文件,但没有奏效.任何帮助将不胜感激.

I already tried different client secret files, but it didn't work. Any help will be appreciated.

推荐答案

问题已解决,我们连接的帐户需要访问 DBM.只需要将google连接帐号添加到DBM即可进行所有服务操作.

Problem resovled, the account we connecte need access to DBM. Just need to add the google connection account to DBM for all service operation.

这篇关于在 python 中使用 DoubleClick Bid Manager API 的 HttpEroor 500 后端错误和 HttpError 403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆