Authentication 谷歌分析API:;错误403-用户对此web属性没有足够的权限。”;

Authentication 谷歌分析API:;错误403-用户对此web属性没有足够的权限。”;,authentication,google-analytics,oauth,oauth-2.0,google-oauth,Authentication,Google Analytics,Oauth,Oauth 2.0,Google Oauth,我一直在尝试通过谷歌分析API链接谷歌广告和谷歌分析账户。但是,我总是遇到以下错误: HttpError: <HttpError 403 when requesting https://www.googleapis.com/analytics/v3/management/accounts/xxxxxxxxx/webproperties/UA-xxxxxxxxx-1/entityAdWordsLinks?alt=json returned "User does not have suffic

我一直在尝试通过谷歌分析API链接谷歌广告和谷歌分析账户。但是,我总是遇到以下错误:

HttpError: <HttpError 403 when requesting https://www.googleapis.com/analytics/v3/management/accounts/xxxxxxxxx/webproperties/UA-xxxxxxxxx-1/entityAdWordsLinks?alt=json returned "User does not have sufficient permissions for this web property.">
需要指出的是,当我使用“试用此API”时,文档网页(见截图)提供的选项与我能够链接我的谷歌广告和分析账户的数据完全相同。

有什么想法吗

analytics = get_service(
            api_name='analytics',
            api_version='v3',
            scopes=['https://www.googleapis.com/auth/analytics.edit'],
            key_file_location='my_service_account_things.json')

analytics.management().webPropertyAdWordsLinks().insert(
      accountId='XXXXXXXXXXXX',
      webPropertyId='UA-XXXXXXXXXXXX-1',
      body={"adWordsAccounts": [{"customerId": "xxx-yyy-zzzz"}],"name": "Name of the link"}).execute()