Re: trying to get report but always just get "ReportDownloadError.MISSING_PARAMETER" "Missing report definition"

2016-02-11 Thread Wesley Ide
Hi Yin,

Yes, Im using Java client library. I saw the examples, and with one of them 
I had a better error message. The problem was the dateRangeType ALL_TIME 
which I was using, but the response message says it is invalid (but had in 
documentation).
It is strange, because the same parameter works with a rest application 
(which I mentioned before). But now I using with another form the 
dateRangeType.

Thanks Yin!!

Em terça-feira, 9 de fevereiro de 2016 15:30:43 UTC-2, Yin Niu escreveu:
>
> Hi Wesley, 
>
> Are you using the Java client library? Here are some Java examples 
> 
>  for 
> downloading reports.  
>
> Thanks,
> Yin, AdWords API Team. 
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/8b7e920f-0b03-4b0c-a3f9-ccb002625fd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: trying to get report but always just get "ReportDownloadError.MISSING_PARAMETER" "Missing report definition"

2016-02-03 Thread Wesley Ide
Hi

I have the same problem.
I add the headers:

   - "User-Agent" : "Mozilla/5.0"
   - "Accept-Language" : "pt-br"
   - "Accept-Charset" : "UTF-8"
   - "Content-Type" : "application/soap+xml"
   - "Authorization" : "Bearer ACCESS_TOKEN"
   - "clientCustomerId", "XXX-XXX-"
   - "developerToken", "XX"
   
And the parameters:

   - __rdxml="https://adwords.google.com/api/adwords/cm/v201506\";>Cost<\/fields>ConversionValue<\/fields><\/selector>Keywords
 
   Performance 
   
Report<\/reportName>KEYWORDS_PERFORMANCE_REPORT<\/reportType>ALL_TIME<\/dateRangeType>CSV<\/downloadFormat><\/reportDefinition>"
   - __fmt="CSV"

But the response is:


   
  ReportDownloadError.MISSING_PARAMETER
  Missing report definition
  
   


I did the request using the DHC tool  with 
the headers and parameters that I mentioned, and worked perfect! But in my 
code (Java), have the behavior that I mentioned above.

Any suggestion about this misterious "MISSING_PARAMETER" or why dont works 
in my code, but did in a REST tool?

Wesley.

Em sexta-feira, 20 de março de 2015 09:57:57 UTC-3, Danial Klimkin escreveu:
>
> Hello Michael,
>
>
> Is it possible some of the HTTP headers were not set?
>
> Can you send me the exact request you've generated, via email? Please use 
> "Reply to author" button on the right.
>
>
> -Danial, AdWords API Team.
>
>
> On Friday, March 20, 2015 at 2:14:29 PM UTC+3, Michael D wrote:
>>
>> Hi, 
>>
>> im in a portableClassLibary so the ClientLibaries doesnt work for me.
>>  
>> I changed what you said but now im gettin this Error: 
>>
>> "> standalone=\"yes\"?>
>> 
>> ReportDownloadError.INVALID_PARAMETER
>> Missing client information
>> 
>> 
>> "
>>
>>
>> This ismy code now:
>>
>> public string GetReport()
>> {
>> var postString = this.ConstructPostRequest();
>> var content = new StringContent(postString, Encoding.UTF8, 
>> "application/x-www-form-urlencoded");
>>
>> var client = new HttpClient();
>>
>> 
>> client.DefaultRequestHeaders.TryAddWithoutValidation("Authorization: ", 
>> "Bearer " + accesToken);
>> 
>> client.DefaultRequestHeaders.TryAddWithoutValidation("developerToken: ", 
>> developerToken);
>> 
>> client.DefaultRequestHeaders.TryAddWithoutValidation("clientCustomerId: ", 
>> clientCustomerId);
>> 
>> client.DefaultRequestHeaders.TryAddWithoutValidation("content-type: ", 
>> "application/x-www-form-urlencoded");
>>
>> var request = new HttpRequestMessage(HttpMethod.Post, 
>> baseAdressAdWords)
>> {
>> Content = content
>> };
>>  
>> var response = client.SendAsync(request).Result;
>> 
>> var Response = response.Content.ReadAsStringAsync().Result;
>>
>> return Response ;
>> }
>> #region Construct Post Request
>> private string ConstructPostRequest()
>> {
>> 
>>  string xml=@"> https://adwords.google.com/api/adwords/cm/v201409"";>
>>   
>> CampaignId
>> Id
>> Impressions
>> Clicks
>> Cost
>> 
>>   Status
>>   IN
>>   ENABLED
>>   PAUSED
>> 
>>   
>>   Custom Adgroup Performance 
>> Report
>>   ADGROUP_PERFORMANCE_REPORT
>>   LAST_7_DAYS
>>   XML
>> "
>>
>>  return "__rdxml="+ System.Net.WebUtility.UrlEncode(xml);
>> }
>> }
>> }
>>
>>
>>
>> Am Montag, 16. März 2015 16:31:49 UTC+1 schrieb Danial Klimkin:
>>>
>>> Hello Michael,
>>>
>>>
>>> The request should have post parameter named "__rdxml", I don't see you 
>>> use this name. Also, the value needs to be url encoded.
>>>
>>> Please consider using our client libraries instead of implementing this 
>>> routine yourself:
>>>
>>>   https://github.com/googleads/googleads-dotnet-lib
>>>
>>>
>>> -Danial, AdWords API Team.
>>>
>>>
>>>
>>> On Monday, March 16, 2015 at 6:25:25 PM UTC+3, Michael D wrote:

 When im sending my request im gettin the following Error:

 
 
 
 ReportDownloadError.MISSING_PARAMETER
 Missing report definition
 
 
 

 The Details on reporting 
  are 
 not clearly telling how it works.

 This is how I do it at the time. But it doesnt work. Is there any c# 
 example on how to do this? 

  public string GetReport()
 {
 var client = new HttpClient();
 client.DefaultRequestHeaders.Add("Authorization", "Bearer " 
 + accesToken);
 client.DefaultReque