ManagedCustomerServiceError.NOT_AUTHORIZED

37 views
Skip to first unread message

Monty808

unread,
Mar 24, 2021, 2:18:26 AM3/24/21
to AdWords API and Google Ads API Forum
Hi,

I am using the python api and I am trying to create a new account.  In the test account I can list accounts and I can create a new account via the api.

However, in the real manager account, I can list accounts but I can not create a new account.  How do I resolve this? Where do I go to change permissions so I can create a new account?


Error summary: {'faultMessage': '[ManagedCustomerServiceError.NOT_AUTHORIZED @ operations[0]]', 'requestId': '0005be33b5cfab9f0a5c0116330d50aa', 'serviceName': 'ManagedCustomerService', 'methodName': 'mutate', 'operations': '1', 'responseTime': '241'}

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/googleads/common.py", line 992, in MakeSoapRequest

    *packed_args, _soapheaders=soap_headers)['body']['rval']

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/proxy.py", line 51, in __call__

    kwargs,

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 135, in send

    return self.process_reply(client, operation_obj, response)

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 229, in process_reply

    return self.process_error(doc, operation)

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 333, in process_error

    detail=fault_node.find("detail"),

zeep.exceptions.Fault: [ManagedCustomerServiceError.NOT_AUTHORIZED @ operations[0]]


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/Users/Documents/new-workspace/etf-project/etfTools/adwords_account_tools.py", line 241, in <module>

    act.create(account_name)

  File "/Users//Documents/new-workspace/etf-project/etfTools/adwords_account_tools.py", line 39, in create

    accounts = self.managed_customer_service.mutate(operations)

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/googleads/common.py", line 1004, in MakeSoapRequest

    e.detail, errors=error_list, message=e.message)

googleads.errors.GoogleAdsServerFault: [ManagedCustomerServiceError.NOT_AUTHORIZED @ operations[0]]

Google Ads API Forum Advisor Prod

unread,
Mar 24, 2021, 12:40:17 PM3/24/21
to davidmo...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out. NOT_AUTHORIZED indicates that the user is not authorized to perform the action. Please make sure that the user email used to generate the OAuth2 credentials has the Admin access to the Google Ads account.

Thanks and regards,
Xiaoming, Google Ads API Team


Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2EmhxK:ref
Reply all
Reply to author
Forward
0 new messages