Google analytics 通过API链接Google AdWords帐户和Google Analytics时权限不足
我想通过API将Google AdWords帐户链接到Google Analytics one 我有Google analytics 通过API链接Google AdWords帐户和Google Analytics时权限不足,google-analytics,integration,google-ads-api,Google Analytics,Integration,Google Ads Api,我想通过API将Google AdWords帐户链接到Google Analytics one 我有 Google AdWords Manager帐户(创建了一些子帐户) Google Analytics帐户(具有已创建的帐户、属性和一些视图) 为了实现这一点,我正在使用这种方法 当我使用“API Explorer”或手动操作(通过web界面)时,一切正常,但当我尝试文档中的示例代码时,我收到的只是以下错误: {"error":{"errors":[{"domain":"global","r
- Google AdWords Manager帐户(创建了一些子帐户)
- Google Analytics帐户(具有已创建的帐户、属性和一些视图)
{"error":{"errors":[{"domain":"global","reason":"insufficientPermissions","message":"User does not have sufficient permissions for this web property."}],"code":403,"message":"User does not have sufficient permissions for this web property."}}
我正在使用Google PHP客户端库。Google Analytics帐户是使用与AdWords Manager帐户相同的电子邮件创建的
这些许可是怎么回事?我需要更多的配置吗
更新
对于GA身份验证,我将继续学习以下教程:
因此,访问后:
我最终得到了json文件:
{
"type": "service_account",
"project_id": "....",
"private_key_id": "...",
"private_key": "..."
"client_email": "...@metal-hologram-.....iam.gserviceaccount.com",
"client_id": "...",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/..."
}
我在GA->Admin->User management->add account(具有完全权限)中添加的客户端\u电子邮件
AdWords验证在此处完成:
->凭证->OAuth->应用程序类型:其他->OAuth
脚本生成的刷新令牌:您是否使用服务帐户发出API查询?你能分享更多关于你如何在API上进行身份验证的信息吗?@Eduardo我已经更新了我的帖子。你是否也添加了对你的AdWords具有完全访问权限的服务帐户?你的意思是:AdWords->Settings->Setup->account access->add->“..@metal hologram-…..iam.gserviceaccount.com”?是的。发出链接命令的总线。在本例中为服务帐户。需要对GA和AdWords进行编辑访问。