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/17a881f4-9179-46c5-9823-ecc7242d6457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.