- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 Google-ads-API。运行 Ubuntu 20.04、Python 3.9(客户端库运行的最低要求是 3.6),使用 google-ads-api V6。这是我痛苦的故事。
我已经创建了一个测试经理帐户 [A],生成了一个开发人员的 token ,并且拥有使用 API 的“测试级别”访问权限,这很棒。测试级别允许您调用有关处理测试帐户(非生产)的信息\报告的 API。
此外,通过帐户 [A] 的整个 Oauth2 凭据,允许测试电子邮件,并在运行“examples/authentication/authenticate_in_web_application.py”后,我被重定向到一个网页,允许我的主要测试经理帐户访问第二个测试经理帐户[B](按照文档的指示,创建另一个测试经理帐户[B],除了带有开发者 token 的主帐户[A]),从此OAuth2提示成功生成刷新 token ,以允许帐户[B] ] 管理我的帐户 [A],将刷新 token 添加到我的 google-ads.yaml 文件中,一切都很好。
当我从示例中运行这个 .py 文件时
python3 google-ads-python/examples/account_management/list_accessible_customers.py
结果是这样的:
Total results: 2
Customer resource name: "customers/1792845307"
Customer resource name: "customers/5341438919"
可爱,花了 2 天时间才走到这一步。现在已经两天了,试图通过以下。
python3 get_account_information.py --c 5341438919
我明白了:
Request with ID "LhKeU9ZI4zZgnp05VSHbjg" failed with status "PERMISSION_DENIED" and includes the following errors:
Error with message "User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid".```
我尝试设置“经理的客户 ID 必须设置在 'login-customer-id' 中”,这个 login-customer-id 位于 .yaml 文件中。我已尝试将其设置为步骤 2 中调用的结果。我还尝试从帐户 [A] 添加帐户经理 ID。我尝试使用 google-ads 的 UI 手动添加帐户 [A] 作为帐户 [B] 的帐户经理,然后尝试为所有这些链接过程再次为所有这些帐户设置“登录客户 ID”,但失败了。
最佳答案
- - - - - - - 解决了 - - - - - - -
更新,就在几个小时后。我使用问题中提到的经理帐户 [B] 中使用的相同电子邮件创建了另一个新经理帐户。遵循与上述相同的步骤,但这次创建后,我得到了这个“RED TEST ACCOUNT FLAG”。
在大约一百次之前的尝试之后,我在终端中运行了它,这是第 678 次:
u@ROOT:~/google-ads-python$ python examples/account_management/list_accessible_customers.py
[2021-01-12 11:30:08 - INFO] Request made: ClientCustomerId: None, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v6.services.CustomerService/ListAccessibleCustomers, RequestId: XIkvfX4b-xxNql705r_jbQ, IsFault: False, FaultMessage: None
Total results: 3
Customer resource name: "customers/1792845307"
Customer resource name: "customers/5341438919"
Customer resource name: "customers/3740041699"
因此,实际识别为测试的新帐户是“3740041699”。记下这个数字,它在 google-ads.yaml 文件中。在“login_customer_id:”下添加它,因为它是一个“经理帐户”[B],它管理我在它下创建的子帐户。编号为 991738295。
# OAuth2 configuration
###############################################################################
# The below configuration parameters are used to authenticate using the #
# recommended OAuth2 flow. For more information on authenticating with OAuth2 #
# see: https://developers.google.com/google-ads/api/docs/oauth/overview #
###############################################################################
developer_token: ******** #[ from Account A]
client_id: ******.apps.googleusercontent.com #[From account A's email, that was used in google cloud console for API OAuth2]
login_customer_id: 3740041699 [The manager test account B, mentioned above]
client_secret: ******** #[From account A's email, that was used in google cloud console for API OAuth2]
refresh_token: 1//********* [After authenticating account A to have access to account B]
现在当在上面运行樱桃时,我们有这个:
u@ROOT:~/examples/basic_operations/get_campaigns.py -c 9917382925 #ID of child of test manager mentioned above, this is the result:
Campaign with ID 12058644642 and name "Website traffic-Search-1" was found.
[2021-01-12 11:36:39 - INFO] Request made: ClientCustomerId: 9917382925, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v6.services.GoogleAdsService/SearchStream, RequestId: Py4oeSqyYiQpBFIWuRYgEg, IsFault: False, FaultMessage: None
这正是那里的东西,如下图所示:
关于python - Google Ads API - "failed with status "PERMISSION_DENIED”- "User doesn' 没有访问客户的权限。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65675633/
当我编写我的 flutter 应用程序时,我在 macOS 上遇到了这个问题,相同的基本代码在我的 windows pc 中工作,但在 macOS 中它不起作用。正如您在我的日志中看到的,应用程序已连
数据库规则: service cloud.firestore { match /databases/{database}/documents { match /{document=**}
我有一个使用 Firebase 的注册流程。当我检查数据库中是否已存在电子邮件时,如下所示: refUsers.queryOrdered(byChild: "email").queryEqual(to
我的终端返回以下错误: PlatformException(PlatformException(执行getDocuments时出错,PERMISSION_DENIED:权限缺失或不足。,null) 已
在权限被拒绝的情况下将数据更新到 RDB 时,我发现了一个奇怪的行为。 重现“bug”所需代码最少的示例: getBooks() { firebase.database().ref("books
这是我的数据结构 { "projects" : { "proj1" : { "-JccS4StrTnJdTficR-u" : { "na
您好,我制作了一个网络应用程序,显示当前位置、最终目的地以及用户需要访问的一些路径点。几天以来谷歌改变了一些关于隐私的事情?现在它不再加载我的地图了。我得到的唯一错误是 getCurrentPos
在我的应用程序中,我有 vc1 推送 vc2。在 vc2 中,我从 Firebase 中提取一些数据。 问题是,当我将规则设置为以下值时,当 vc2 被推送时,我不断收到 failed:permiss
我有一个问题,我在网上搜索并找到了一个真正的答案,但它对我不起作用。我有一个应用程序,用户可以在其中发布图像,并为他们加载所有已发布图像的提要。一个问题是我不断在输出中收到 permission_de
我遇到了这样的问题,当我尝试初始化 firebase 并获取 FCM token 时,我得到了这个错误,谁遇到过它?可能是什么原因?一个月前,一切正常,之后 google-services.json
我目前正在尝试运行一个 docker GitHub Action,它构建一个 docker 镜像并将其推送到 GitHub 包,但我收到了一个我从未见过的错误。出于某种原因,它无法推送 docker
我正在尝试 Google Cloud Vision API(测试版),但它返回“权限被拒绝”消息。但该项目启用了“Cloud Vision API”。如有任何帮助,我们将不胜感激。 来自 Google
我正在尝试使用 Google+ 提供的 PersonAPI 获取性别和出生日期,但我在日志中收到服务器端错误。 这是我的 Logcat: com.google.api.client.googleapi
我正在使用混合了 Firebase 和 AngularFire 的 AngularJS 应用程序。当我单击调用 Logout() 函数的按钮时,Logout() 调用 ref.unauth() 但偶尔
我在 App 消息传递中设置了 firebase。已创建 Activity ,但我的应用无法转换。在 logcat 中,我得到了以下日志 2019-02-26 11:22:40.616 16131-1
我正在写入数据库并尝试读取它,它总是说:失败:使用来自 Firebase 的用户规则时 permission_denied。我正在尝试从 Firebase 写入和读取以写入名字和姓氏。树布局如下。用户
根据文档测试收集组 (https://firebase.google.com/docs/firestore/security/rules-query#collection_group_queries_
嗨,我是 Angular 和 Firebase 的新手,对下一个问题感到困惑: 我有两个组成部分- 授权区域(父组件)和文件夹(子组件)。授权区域有一个注销按钮,文件夹可以访问来自 firebase
我正在编写一项服务(在.NET Core 3.1和Refit中,如果有关系的话),该服务将从给定日期范围内我的PayPal商业帐户中提取交易事件,以在管理仪表板上使用。目前,我在这里关注本教程: ht
我收到错误 gettingdocuments.com.google.firebase.firestore.FirebaseFirestoreException: PERMISSION_DENIED:
我是一名优秀的程序员,十分优秀!