Hi  Sherwin,

I have corrected my 'impersonated_email' parameter and now I am getting a 
new  error as below,

[2022-10-06 19:17:31 - WARNING] Request made: ClientCustomerId: 9662991256, 
Host: googleads.googleapis.com, Method: 
/google.ads.googleads.v11.services.GoogleAdsService/SearchStream, 
RequestId: RuvaWWWNXlLg4JdS24ekrg, IsFault: True, FaultMessage: User 
doesn't have permission to access customer. Note: If you're accessing a 
client customer, the manager's customer id must be set in the 
'login-customer-id' header. See 
https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid
Request with ID "RuvaWWWNXlLg4JdS24ekrg" failed with status 
"PERMISSION_DENIED" and includes the following errors:
        Error with message "User doesn't have permission to access 
customer. Note: If you're accessing a client customer, the manager's 
customer id must be set in the 'login-customer-id' header. See 
https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid";


Can you please help me to fix this issue.

On Thursday, October 6, 2022 at 2:56:36 PM UTC+5:30 adsapi wrote:

> Hi Jeeva,
>
> Thank you for reaching us out. I am Sherwin from Google Ads API support 
> team. I hope that you are doing well today.
>
> I can see that you have received the NOT_ADS_USER error when you attempted 
> to connect to the API. The NOT_ADS_USER 
> <https://google-dev-relations.lightning.force.com/lightning/r/Case/5004Q00002dIQUSQA4/undefined>
>  error 
> is encountered when the service account has not been correctly linked to 
> the Google Ads account via the OAuth2 assertion flow. Please take note that 
> the email address you may have used to generate the credentials should have 
> access or be associated with Google Ads accounts.  
>
> In order to connect to Google Ads API using a Google service account, you 
> will need a *Google Workspace domain* 
> <https://google-dev-relations.lightning.force.com/lightning/r/Case/5004Q00002dIQUSQA4/undefined>
>  since 
> it is a prerequisite for using service accounts. Since you mentioned that 
> you’re using service account credentials, please confirm if you already 
> followed all the mentioned *requirements* 
> <https://google-dev-relations.lightning.force.com/lightning/r/Case/5004Q00002dIQUSQA4/undefined>
> :
>
>    1. The service account that you created needs to be granted domain 
>    wide delegation access 
>    
> <https://google-dev-relations.lightning.force.com/lightning/r/Case/5004Q00002dIQUSQA4/undefined>
>  by 
>    a super administrator for the domain. 
>    2. Using a Google Ads user with permissions on the Google Ads account 
>    you want to access.  
>    3. Make sure that you have your own domain registered with Google 
>    Workspace. 
>    4. Service account will have the ability to impersonate any user in 
>    the domain 
>
>
> You may refer to this *API documentation* 
> <https://google-dev-relations.lightning.force.com/lightning/r/Case/5004Q00002dIQUSQA4/undefined>
>  that 
> discusses how to access the Google Ads API with service accounts. 
>
> In addition, kindly note that, we strongly recommend using* OAuth2 
> installed app or web flows * 
> <https://google-dev-relations.lightning.force.com/lightning/r/Case/5004Q00002dIQUSQA4/undefined>instead
>  
> of service accounts unless you need domain-specific features (for example, 
> impersonation). OAuth2 installed application and web flows require user 
> interaction only once, when access to the account is granted. You need to 
> implement the code set up on your end to make calls using service accounts. 
>
> Kind regards, 
> [image: Google Logo] 
> Sherwin Vincent 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2ey7aG:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/5a464b80-bc34-429e-a329-043786908883n%40googlegroups.com.
  • Go... Jeeva Bharathy
    • ... Jeeva Bharathy
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to