Hi,

I am developing an application that daily download a Keyword Performance 
Report as CSV file. To request the OAuth 2.0 token I pass this 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],
}

It returns an access token (to retrieve the access token is not a problem 
because I have already used the code to get other tokens with different 
scopes). I use this token with the following head to make a Http request to 
https://adwords.google.com/api/adwords/reportdownload/v201502:

    request.Headers.Add("Authorization", "Bearer " + access_token);
    request.Headers.Add("developerToken", "xxxxxxxxxxxxxx");
    request.Headers.Add("clientCustomerId", "xxxx-xxxx-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>

And I get this response back

<?xml version="1.0" encoding="UTF-8" 
standalone="yes"?><reportDownloadError><ApiError><type>AuthenticationError.NOT_ADS_USER</type><trigger>&lt;null&gt;</trigger><fieldPath></fieldPath></ApiError></reportDownloadError>

I am new at Google Group Forum,so if this post is a duplicate sorry.What 
should I do?

Thanks,

Guilherme 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/78158b97-31e3-4218-b1e3-2ec2d9518d9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to