authentication_error: NOT_ADS_USER

86 views
Skip to first unread message

Pat Chaiyabud

unread,
Oct 5, 2022, 8:46:51 PM10/5/22
to Google Ads API and AdWords API Forum
Hi there,
I'm trying to use service account to make request to google ads api and have been getting the following error

        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 = "UNKNOWN:Error received from peer ipv**** {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, created_time:"2022-10-06T00:30:16.5288888+00:00"}"
 error_code {
    authentication_error: NOT_ADS_USER
  }
  message: "User in the cookie is not a valid Ads user."
}

I got the following details for authorization but wonder if I've missed something.

"type": "service_account",
"project_id": "",
"private_key_id": "",
"private_key": ""
"client_email": "",
"client_id": "",
"auth_uri": "",
"scope": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": "",
"impersonated_email": "",
"developer_token": "",
"use_proto_plus": ""

 After going back to document again, I guess that impersonated email could be the missing piece. Could you tell me how and where to get this email? Is it from Google Ads Manager?

Cheers  


Google Ads API Forum Advisor

unread,
Oct 6, 2022, 1:48:56 AM10/6/22
to pat.ch...@unimelb.edu.au, adwor...@googlegroups.com
Hi Pat,

Thank you for reaching us out. I am Sherwin from Google Ads API support team. I hope that you are doing well today.

With regard to your concern "After going back to document again, I guess that impersonated email could be the missing piece. Could you tell me how and where to get this email? Is it from Google Ads Manager?", you can put any email address which is managed by Google Workspace domain which has a Google Ads account. As mentioned here on this document, A service account can only impersonate users (email addresses) in the same Google Workspace.

If you have other concerns, please let us know.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


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