Hello,

I need someone to help me understand what's needed to actually get data out 
of the Ads & Analytics API. I'm working with a client that wants me to pull 
in data from their Google Ads and Analytics data sources, do some tweaking, 
and upload it into a Google Sheet. I've looked through every document I can 
find about the client libraries, sample code, examples, OAuth, service 
accounts, and credentials and I can't figure out what's wrong. I should add 
I'm a senior backend engineer so I'm not new to APIs. 

In working through the documentation this is what has been done so far. The 
client has made a project, has made an OAuth credential, has made a service 
account, and has enabled the Google Ads API, Google Analytics Reporting 
API, and the Google Sheets API. They have sent me the client_id/secret, and 
the .json file for the service account. 

I've managed to use the sample here 
<https://github.com/googleads/google-ads-python/blob/master/examples/authentication/authenticate_in_standalone_application.py>to
 
create an OAuth token. However when I try to run this sample 
<https://github.com/googleads/google-ads-python/blob/master/examples/reporting/get_keyword_stats.py>
 
I run into the following error: 

Request with ID "None" failed with status "UNAUTHENTICATED" and includes 
the following errors:
Request made: ClientCustomerId: XXXXXXXX , Host: 
googleads.googleapis.com:443, Method: 
/google.ads.googleads.v3.services.GoogleAdsService/SearchStream, RequestId: 
None, IsFault: True, FaultMessage: User in the cookie is not a valid Ads 
user.
        Error with message "User in the cookie is not a valid Ads user.".

My yaml file looks like this:

path_to_private_key_file: './service_account.json'
delegated_account: 'xxxxx.iam.gserviceaccount.com'
developer_token: 'fdxxxxxxxxxxxx'

I don't have a Google account that's associated with their company if that 
matters. Can someone help me debug what's wrong here?

Josh


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c2253d01-86ab-482b-8277-7702d24b3d6b%40googlegroups.com.

Reply via email to