Hi Mike,

Thank you mike.  Yup its seems like report headers are not correct.

Please tell me *what is User-Agent?*

I got rest of the parameters. 


Regards,
Shreedhar


On Wednesday, December 16, 2015 at 7:46:19 PM UTC+5:30, Michael Cloonan 
(AdWords API Team) wrote:
>
> Hello,
>
> Based on the error message, it seems like you may not be setting your HTTP 
> headers correctly, even if the XML is valid. Here's an example of what a 
> set of valid HTTP headers looks like, in addition to a valid report request 
> XML:
>
> Report request to: '
>> https://adwords.google.com/api/adwords/reportdownload/v201509'
>> HTTP headers: [Content-Type: application/x-www-form-urlencoded, 
>> Authorization: [REDACTED], User-Agent: [REDACTED], clientCustomerId: 
>> [REDACTED], developerToken: [REDACTED], skipReportHeader: false, 
>> skipReportSummary: false, skipColumnHeader: false, includeZeroImpressions: 
>> false]
>> <reportDefinition>
>>   <selector>
>>     <fields>CampaignId</fields>
>>     <fields>AdGroupId</fields>
>>     <fields>Id</fields>
>>     <fields>Criteria</fields>
>>     <fields>CriteriaType</fields>
>>     <fields>FinalUrls</fields>
>>     <fields>Impressions</fields>
>>     <fields>Clicks</fields>
>>     <fields>Cost</fields>
>>     <predicates>
>>       <field>Status</field>
>>       <operator>IN</operator>
>>       <values>ENABLED</values>
>>       <values>PAUSED</values>
>>     </predicates>
>>   </selector>
>>   <reportName>Last+7+days+CRITERIA_PERFORMANCE_REPORT</reportName>
>>   <reportType>CRITERIA_PERFORMANCE_REPORT</reportType>
>>   <dateRangeType>LAST_7_DAYS</dateRangeType>
>>   <downloadFormat>CSV</downloadFormat>
>> </reportDefinition>
>
>
> You need to specify the Authorization, User-Agent, clientCustomerId, and 
> developerToken headers in order for the request to work. If you do not have 
> these, you can use the Get Started guide 
> <https://developers.google.com/adwords/api/docs/guides/start> to learn 
> more. This guide will help you set up all of those pieces of data except 
> the access token. Instead, it will set you up with a refresh token, which 
> can be used to generate access tokens. Our OAuth 2.0 guide also has 
> instructions for how to generate an access token from a refresh token 
> <https://developers.google.com/adwords/api/docs/guides/authentication#access_and_refresh_token>
> .
>
> Once you get this all set up, please give it another try. If it fails 
> again, please include both the HTTP request headers and body in the log so 
> that I can make sure that everything is present.
>
> Regards,
> Mike, AdWords API Team
>
> On Wednesday, December 16, 2015 at 2:05:13 AM UTC-5, 
> shreedha...@accenture.com <javascript:> wrote:
>>
>> Hello Mike,
>>
>> *Please find attached xml attached.*
>>
>> I need one help can you* please share sample HTTP request of Dot Net 
>> code for pulling a report from API with sample XML file*. I will try 
>> following that format to VBA Excel and try again.
>>
>>
>> *The error message is as below:*
>> *<?xml version="1.0" encoding="UTF-8" 
>> standalone="yes"?><reportDownloadError><ApiError><type>ReportDownloadError.MISSING_PARAMETER</type><trigger>Missing
>>  
>> report 
>> definition</trigger><fieldPath></fieldPath></ApiError><ApiError><type>ReportDownloadError.INVALID_PARAMETER</type><trigger>Missing
>>  
>> client 
>> information</trigger><fieldPath></fieldPath></ApiError></reportDownloadError>*
>>
>>
>>
>> Regards,
>> Shreedhar
>>
>> On Tuesday, December 15, 2015 at 9:59:35 PM UTC+5:30, Michael Cloonan 
>> (AdWords API Team) wrote:
>>>
>>> Hello,
>>>
>>> Our .NET client library 
>>> <https://github.com/googleads/googleads-dotnet-lib> does support VB, 
>>> although I'm not sure if that's quite the same as using VBA from excel.
>>>
>>> However, a client library is not required if you formulate your request 
>>> correctly. Can you please log the full XML, rather than showing the code 
>>> that generates the XML, because then it would be easy to take a look and 
>>> see where the formatting you're using may differ from the correct 
>>> formatting that would result in a successful request.
>>>
>>> Regards,
>>> Mike, AdWords API Team
>>>
>>> On Tuesday, December 15, 2015 at 9:16:45 AM UTC-5, 
>>> shreedha...@accenture.com wrote:
>>>>
>>>> Hi Team,
>>>>
>>>> I am trying to pull a report from Adwords by API calls using *Excel 
>>>> VBA with Windows HTTP request.*
>>>> But I am arriving at below error:
>>>>
>>>> *<?xml version="1.0" encoding="UTF-8" 
>>>> standalone="yes"?><reportDownloadError><ApiError><type>ReportDownloadError.MISSING_PARAMETER</type><trigger>Missing
>>>>  
>>>> report 
>>>> definition</trigger><fieldPath></fieldPath></ApiError><ApiError><type>ReportDownloadError.INVALID_PARAMETER</type><trigger>Missing
>>>>  
>>>> client 
>>>> information</trigger><fieldPath></fieldPath></ApiError></reportDownloadError>*
>>>>
>>>>
>>>> and the code i tried as below
>>>>
>>>>
>>>> Sub TestAPI()
>>>>
>>>>
>>>> Dim objHTTP As Object
>>>> Dim result As String
>>>> Dim Xml As Variant
>>>> Dim Fs As FileSystemObject
>>>> Dim FileData() As Byte
>>>> Dim Arr() As String
>>>> Dim St As String
>>>>
>>>>    Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
>>>>    URL = "https://adwords.google.com/api/adwords/reportdownload/v201509
>>>> "
>>>>    
>>>>    objHTTP.Open "POST", URL, False
>>>>    
>>>>    objHTTP.setRequestHeader "Authorization", "Bearer 3756320"
>>>>    objHTTP.setRequestHeader "DEVELOPER_TOKEN", "NegtkJjSr7jcrQSdeI4Nzg"
>>>>    objHTTP.setRequestHeader "CLIENT_CUSTOMER_ID", "328-664-6765"
>>>>    
>>>>    'objHTTP.RequestBody "__rdxml", Xml
>>>>        
>>>>    '  Set Fs = New FileSystemObject
>>>>   'Set Xml = Fs.OpenTextFile("C:\Users\ajkumar\Desktop\Shreedhar\New 
>>>> Text Document.xml")
>>>>
>>>>    'St = Xml.ReadAll
>>>>    ' "<fields>Id</fields>" & _
>>>>
>>>>   ' "<predicates>" & _
>>>>       "<field>Status</field>" & _
>>>>       "<operator>IN</operator>" & _
>>>>       "<values>ENABLED</values>" & _
>>>>       "<values>PAUSED</values>" & _
>>>>     "</predicates>" & _
>>>> ' "<fields>CampaignId</fields>" & _
>>>>
>>>>    St = "<reportDefinition xmlns=" & """" & "
>>>> https://adwords.google.com/api/adwords/cm/v201509"; & """" & ">" & _
>>>>       "<selector>" & _
>>>>    "<fields>Impressions</fields>" & _
>>>>     "<fields>Clicks</fields>" & _
>>>>     "<fields>Cost</fields>" & _
>>>>   "</selector>" & _
>>>>   "<reportName>Account Performance</reportName>" & _
>>>>   "<reportType>ACCOUNT_PERFORMANCE_REPORT   </reportType>" & _
>>>>   "<dateRangeType>LAST_7_DAYS</dateRangeType>" & _
>>>>   "<downloadFormat>CSV</downloadFormat>" & _
>>>> "</reportDefinition>"
>>>>    objHTTP.send St
>>>>    result = objHTTP.responseText
>>>>
>>>> End Sub
>>>>
>>>>
>>>> Your guidance and help would be really helpful.
>>>>
>>>> Regards,
>>>> Shreedhar Bakale
>>>>
>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/56f92bb6-91da-4403-ad92-29f969487b16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to