GoogleAdsServerFault: [AuthenticationError.OAUTH_TOKEN_INVALID @ ; trigger:'<null>']

74 views
Skip to first unread message

Rohit kukreja

unread,
Jun 8, 2020, 8:58:16 AM6/8/20
to AdWords API and Google Ads API Forum
While trying to run get_campaigns.py I am getting this error,

Traceback (most recent call last):
  File "get_Campaigns.py", line 72, in <module>
    main(adwords_client)
  File "get_Campaigns.py", line 55, in main
    page = campaign_service.get(selector)
  File "C:\Users\Dipanshu Sharma\AppData\Local\Programs\Python\Python36\lib\site-packages\googleads\common.py", line 1004, in MakeSoapRequest
    e.detail, errors=error_list, message=e.message)
googleads.errors.GoogleAdsServerFault: [AuthenticationError.OAUTH_TOKEN_INVALID @ ; trigger:'<null>']

I have tried with new OAuth Credentials with new refresh Tokens,

please help

Google Ads API Forum Advisor Prod

unread,
Jun 8, 2020, 12:33:48 PM6/8/20
to rohit.k...@gmail.com, adwor...@googlegroups.com

Hi Rohit,

Thank you for reaching out. The OAUTH_TOKEN_INVALID error occurs when the access token not associated with your account is passed into the request header. Please make sure you used the email associated with your manager account to create the OAuth credentials and your manager account has admin or standard access to the client customer account you are making API calls against.

Thanks and regards,
Xiaoming, Google Ads API Team



 

ref:_00D1U1174p._5004Q20X2qi:ref

Akanksha Kuls

unread,
Sep 10, 2020, 5:03:19 AM9/10/20
to AdWords API and Google Ads API Forum
Daily Adwords dag is failing for  [AuthorizationError.USER_PERMISSION_DENIED  error, nothing has changed at our side. 
Please find the error message below:
This das is the running since long time and not sure what has changed all of sudden.

  01:02:48,395] {logging_mixin.py:112} INFO - Running %s on host %s <TaskInstance: fcgdps1_adwords_src_curated.geo_part_3_facts_ingestion_task 2020-09-09T01:00:00+00:00 [running]> srpapp550566.gds.local 

[2020-09-10 01:02:51,087] {logging_mixin.py:112} INFO - [2020-09-10 01:02:51,087] {aws_operators.py:117} ERROR - {'errorMessage': "[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'<null>']", 'errorType': 'GoogleAdsServerFault', 'stackTrace': [' File "/var/task/lambda_function.py", line 152, in lambda_handler\n adaccount_ids = get_adaccount_data()\n', ' File "/var/task/lambda_function.py", line 74, in get_adaccount_data\n results = manager_service.get(selector)\n', ' File "/var/task/googleads/common.py", line 1004, in MakeSoapRequest\n e.detail, errors=error_list, message=e.message)\n']}

 [2020-09-10 01:02:51,097] {taskinstance.py:1128} ERROR - Lambda invoke failed Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 961, in _run_raw_task result = task_copy.execute(context=context) File "/opt/airflow/plugins/operators/aws_operators.py", line 224, in execute lambda_hook.handle_response_payload(response) File "/opt/airflow/plugins/operators/aws_operators.py", line 118, in handle_response_payload raise AirflowException('Lambda invoke failed') airflow.exceptions.AirflowException: Lambda invoke failed  

Google Ads API Forum Advisor Prod

unread,
Sep 10, 2020, 3:26:02 PM9/10/20
to akku...@gmail.com, adwor...@googlegroups.com

Hi Akanksha,

Thank you for reaching out. The USER_PERMISSION_DENIED error usually occurs when there is no link between the manager account authenticated in the request and the client account specified in the headers. If the link between the manager and client account was removed or you don’t have access to the client customer id specified or any of its manager accounts, you may encounter this error. If you are using the Google Ads API you need to include the login-customer-id in the header as mentioned in this blog post



Thanks and regards,
Xiaoming, Google Ads API Team



Google Logo
Xiaoming
Google Ads API Team
 


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