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, > [email protected] <javascript:> 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 [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 https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/69b1f83b-6be1-413a-ab2d-cf6407e5ed37%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Test.xml
Description: XML document
