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:
{
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:
<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>
What should I do?
Thanks,
Guilherme Foz Nassim