Good day, Thanks for your response.
I have managed to make the code above work. I have just replaced *OAuth2PrnEmail *with the manager's account email - I used the service account before, and it didn't work. Thanks for your help! Feel free to close the ticket. Regards, Vlad On Mon, Jun 26, 2023 at 12:00 PM Google Ads API Forum Advisor <adsapi@forumsupport.google> wrote: > Hi Vlad, > > Thank you for the reply. > > Kindly note that the *NOT_ADS_USER* error ( > https://developers.google.com/google-ads/api/docs/best-practices/common-errors#authenticationerror) > is one of the common authorization errors encountered when the service > account has not been correctly linked to the Google Ads account via the > OAuth2 assertion flow. Kindly note that you need to use the actual email > address of the Google Ads user with permissions on the Google Ads account > you want to access. You may check the guide on how to set up OAuth2 for API > access using your own credentials with a service account in the client > library you are using *here*: > https://developers.google.com/google-ads/api/docs/oauth/service-accounts?hl=en#client_library_configuration > > This error typically means that the *email address *used to create your > OAuth credentials in Google Cloud Console is not associated with any Google > Ads account. See this section in our *Common Errors* ( > https://developers.google.com/google-ads/api/docs/best-practices/common-errors#authenticationerror > ) guide. > > If you know the email address that was used to create your OAuth > credentials, you should be able to log into the Google Ads UI and send it > an invitation by following the instructions in the guide I linked to above. > > You may also need to enable the Google Ads API in your Google Cloud > project by following the steps *here* ( > https://developers.google.com/google-ads/api/docs/first-call/oauth-cloud-project > ). > > If you are still encountering errors after considering all the mentioned > information above, you may provide us with the user account / email address > that you used to generate API access so we can further check this > information. You may then send the requested information via the Reply > privately to author option. If this option is not available, you may send > the details directly to our googleadsapi-supp...@google.com alias instead. > > In addition, we strongly recommend using *OAuth2 installed app or web > flows* ( > *https://developers.google.com/google-ads/api/docs/oauth/cloud-project#choose_an_application_type* > <https://developers.google.com/google-ads/api/docs/oauth/cloud-project#choose_an_application_type>) > 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. > > This message is in relation to case "ref:_00D1U1174p._5004Q2mWOfh:ref" > > Thanks, > > [image: Google Logo] Google Ads API Team > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/CAPM7oBYADbmzLmYSykGM0mrbxLNS8NGy6beNu86YR10tD%2BrgyQ%40mail.gmail.com.