Service account give NOT_ADS_USER error

67 views
Skip to first unread message

pratik patel

unread,
Nov 8, 2021, 8:35:46 AM11/8/21
to AdWords API and Google Ads API Forum
Hi,

We try to use python script that https://github.com/google/shopping-markup.

This script use big query to datatransfer of merchant & ads account. 
- We create Google console Project
- We create service Account
- Service account enable with Outh
- Service account add to Domain Delegation
use clineID, and following api scope
https://www.googleapis.com/auth/adwords
https://www.googleapis.com/auth/bigquery.insertdata

But still we not getting NOT_ADS_USER error. it means service account not enable access to ads api. 

We used Google workspace account to create the GCP, have access to Ads Account(MCC & Which we access ) & GCM as standard.  

RROR:root:Transfer projects/xxxxxxxxxxx/locations/us/transferConfigs/61916511-0000-2393-a71d-883d24f2c204 was not successful. Error - code: 3
message: "Error while processing report for table \'HourlyAccountStats\' for account id xxxxxxxxxx. Http(400) Bad Request; <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><reportDownloadError><ApiError><type>AuthenticationError.NOT_ADS_USER</type><trigger>&lt;"

Traceback (most recent call last):
  File "cloud_env_setup.py", line 149, in <module>
    main()
  File "cloud_env_setup.py", line 118, in main
    data_transfer.wait_for_transfer_completion(ads_config)
  File "/home/pratik/shopping-markup/cloud_data_transfer.py", line 110, in wait_for_transfer_completion
    raise DataTransferError(error_message)
cloud_data_transfer.DataTransferError: Transfer projects/xxxxxxxxxx/locations/us/transferConfigs/61916511-0000-2393-a71d-883d24f2c204 was not successful. Error - code: 3
message: "Error while processing report for table \'HourlyAccountStats\' for account id xxxxxxxxxx. Http(400) Bad Request; <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><reportDownloadError><ApiError><type>AuthenticationError.NOT_ADS_USER</type><trigger>&lt;


Can you help why we getting this error.? 

Regards,
Pratik Patel

Google Ads API Forum Advisor

unread,
Nov 8, 2021, 3:06:39 PM11/8/21
to anay....@gmail.com, adwor...@googlegroups.com
Hi Pratik,

Did the the domain administrator delegate domain-wide authority to your service account? Does the delegated account a user in the ads account you are trying to reach?

Could you privately send us a request and response log of API communication that returns this error?  The request and response appears similar to the JSON Mappings in our REST documentation. Our client libraries have loggers with logging instructions, to see these instructions you can click on the client library you use in the sidebar of our client library guide and click on "Logging". Setting the logger to 'DEBUG' will get the desired log.


Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey

Regards,
 
Google Logo
Aryeh Baker
Google Ads API Team
 


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