Hello Ivan, You are right, the AuthorizationError.USER_PERMISSION_DENIED <https://developers.google.com/adwords/api/docs/common-errors#AuthorizationError.USER_PERMISSION_DENIED> occurs when there is no link between the manager account authenticated in the request and the client account specified in the headers.
While logged into AdWords as your test manager account, any client accounts you create will automatically be test accounts under that manager only. If you don't see the test accounts under your test MCC account, It could be possible that while creating test accounts you might login as another MCC account user. So, as a precaution you could use incognito window of browser and login with your test MCC account to create test client accounts <https://developers.google.com/adwords/api/docs/guides/first-api-call#create_test_accounts>. If you don't want to create new accounts then you can un link the accounts <https://support.google.com/google-ads/answer/7456531> under that another manager account and link them <https://support.google.com/google-ads/answer/7456530>to your manager account. Alternatively you can link and un link accounts via API using managedCustomerService.mutateLink <https://developers.google.com/adwords/api/docs/reference/v201806/ManagedCustomerService#mutatelink> service, you could refer this guide <https://developers.google.com/adwords/api/docs/guides/accounts-overview#managedcustomerservice> for more details. Also, you could fetch the list of accounts linked to your manager account by using managedCustomerService.get <https://developers.google.com/adwords/api/docs/reference/v201806/ManagedCustomerService#get> operation. If you are still facing issues, please share the MCC Id's of test manager accounts and CID's of test client accounts, you could use *reply privately to author* option while sharing the details. Regards, Sai Teja, AdWords API Team. On Friday, September 7, 2018 at 5:17:02 AM UTC-4, Ivan wrote: > > Hello! > > I am trying to make my first API call, so I set up a test manager account > and a few test client accounts (i.e. the dummy accounts created under the > test manager account). But when running generate_refresh_token.py, I > received this: > > Error summary: {'faultMessage': > "[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'<null>']", > 'requestId': '0005753d9c9f13580a3706d12803025d', 'serviceName': > 'CampaignService', 'methodName': 'get', 'operations': '1', 'responseTime': > '86'} > > This made me realize I hadn't actually linked the test manager account to > the test client accounts. But when I tried to link them to the test manager > account, I received this: > > "You can't link this account because it's already linked to another > manager in this account hierarchy. If you don't manage this account, please > contact your top manager account to change its manager to this manager." > Please see attachment. > > As stated in the docs, "While logged in to AdWords as your test manager > account, any client accounts you create will automatically be test > accounts.", so I find it hard to understand that "it's already linked to > another manager in this account hierarchy". These are test accounts created > under a test manager. > > As a side note, I am also having the same minor error described in the > links below, namely that test client accounts are not showing where they > should. While not fatal, this minor error might be related (or not) > > > https://groups.google.com/forum/#!searchin/adwords-api/client$20accounts|sort:date/adwords-api/uNk-uBn9VWo/08VTuEi6BAAJ > > > https://www.en.advertisercommunity.com/t5/Google-Ads-Account-Issues/New-Client-Accounts-Create-As-Cancelled/td-p/1779481 > > Thanks in advance! > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/c63ce24c-c009-462e-b0fc-eb76d4e7cd4f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
