Hello, I think what you would like to do is impersonation as your AdWords account user.
This guide <https://developers.google.com/identity/protocols/OAuth2ServiceAccount> may be useful to what you are trying to achieve. Search for *impersonate* in the page and try following the steps. Hope this help and please let me know if that doesn't work. Cheers, Thanet, AdWords API Team On Tuesday, June 2, 2015 at 7:37:01 PM UTC+9, Guilherme Nassim wrote: > > Hi Thanet, > > Thanks for your answer but I am using OAuth 2.0 for Server to Server > Applications therefore the user that request is a server account email > address. The owner of this application, the one that generated the OAuth > client Id and the key, is the same owner of the Adwords account. How can I > associate this server account email address to my Adwords account? > > Regards, > Guilherme Nassim > > On Tuesday, June 2, 2015 at 9:58:28 AM UTC+2, Thanet Knack Praneenararat > (AdWords API Team) wrote: >> >> Hi Guilherme, >> >> The NOT_ADS_USER error means that the user whose OAuth credentials you >> are using is not associated with an AdWords account. >> Please generate another refresh/access token, making sure you are signed >> in as a user with access to your test account. >> >> Also, please take a look at the SOAP Primer guide >> <https://developers.google.com/adwords/api/docs/guides/soap>since it >> explains which HTTP header you will need to use when you pass the access >> token. >> >> Cheers, >> Thanet, AdWords API Team >> >> On Tuesday, June 2, 2015 at 6:27:17 AM UTC+9, Guilherme Nassim wrote: >>> >>> Hi, >>> >>> I am developing an application to daily download a Keyword Performance >>> report using the Adwords API. To get the OAuth 2.0 I pass the followed >>> values: >>> >>> { >>> iss = "[email protected]", >>> scope = "https://www.googleapis.com/auth/adwords", >>> aud = "https://www.googleapis.com/oauth2/v3/token", >>> iat = times[0], >>> exp = times[1], >>> } >>> >>> And I receive an access_token back that I use to make an Http request >>> with this headers: >>> >>> request.Headers.Add("Authorization", "Bearer " + access_token); >>> request.Headers.Add("developerToken", "xxxxxxxxxxxx"); >>> request.Headers.Add("clientCustomerId", "xxx-xxx-xxxx"); >>> request.Method = "POST"; >>> request.ContentType = "application/x-www-form-urlencoded"; >>> >>> With this body: >>> >>> __rdxml=<reportDefinition xmlns=" >>> https://adwords.google.com/api/adwords/cm/v201502 >>> "><selector><fields>AccountDescriptiveName</fields> >>> <fields>AccountCurrencyCode</fields> >>> <fields>Impressions</fields> >>> <fields>Clicks</fields> >>> <fields>Cost</fields> >>> <fields>AveragePosition</fields> >>> <predicates> >>> <field>Impressions</field> >>> <operator>GREATER_THAN</operator> >>> <values>0</values> >>> </predicates> >>> </selector> >>> <reportName>Custom Keyword Performance Report</reportName> >>> <reportType>KEYWORDS_PERFORMANCE_REPORT</reportType> >>> <dateRangeType>YESTERDAY</dateRangeType> >>> <downloadFormat>CSV</downloadFormat> >>> </reportDefinition> >>> >>> the response that I get back is: >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> >>> <reportDownloadError> >>> <ApiError> >>> <type>AuthenticationError.NOT_ADS_USER</type> >>> <trigger><null></trigger> >>> <fieldPath></fieldPath> >>> </ApiError> >>> </reportDownloadError> >>> >>> Using OAuth 2.0 Playground application ( >>> https://developers.google.com/oauthplayground/ ) passing the post body >>> with developerToken and clientCustomerId it works. >>> What should I do? >>> >>> Thanks, >>> >>> Guilherme Foz Nassim >>> >>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e6c1ad32-7075-4eef-8b84-d603ec7d7c70%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
