Unable to access Google Ads API using Service account

212 views
Skip to first unread message

Sundaram Krishnamani

unread,
Sep 29, 2021, 3:24:40 AM9/29/21
to AdWords API and Google Ads API Forum
Hi Team,

We are trying to fetch data from google ads api using service account and getting the below error.

GoogleAdsException: (<_SingleThreadedRendezvous of RPC that terminated with: status = StatusCode.UNAUTHENTICATED details = "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project." debug_error_string = "{"created":"@1632898752.574941359","description":"Error received from peer ipv4:216.58.214.10:443","file":"src/core/lib/surface/call.cc","file_line":1069,"grpc_message":"Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","grpc_status":16}"

We are using a centralized service account in 2 projects and both of them have google ads api enabled. Can you please help us with this issue.

Thanks!
Sundaram

Google Ads API Forum Advisor

unread,
Sep 29, 2021, 10:04:35 PM9/29/21
to sundaram...@tigeranalytics.com, adwor...@googlegroups.com

Hello Sundaram,

Thank you for reaching out to us.

Since you're using service accounts when accessing the API, have you tried the steps mentioned on this guide? Please note that we strongly recommend using OAuth2 desktop app or web app flow instead of service accounts unless you need a domain-specific feature (for example, impersonation). OAuth2 desktop app and web app flows do require an initial user interaction for granting access to the account, but are much simpler to set up.

If the issue still persists even after following the provided guide, kindly share to us the complete logs (request and response with request-id). You can send the requested details via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Regards,

Google Logo
Mark Kevin Albios
Google Ads API Team
 


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