API call to Ad performance report

107 views
Skip to first unread message

Meghana Boddu

unread,
Sep 20, 2018, 3:45:46 PM9/20/18
to AdWords API and Google Ads API Forum
Hi,
I am trying to retrieve data from Google Adwords Ad PerformanceReport.
I am using following configurations,
URL: 
Request Body:
Parameters:
__rdxml: <?xml version="1.0" encoding="UTF-8"?>
<selector>
<fields>Date</fields>
<fields>Impressions</fields>
<fields>Clicks</fields>
<fields>Cost</fields>
<fields>Conversions</fields>
<predicates>
  <field>Status</field>
  <operator>IN</operator>
  <values>ENABLED</values>
  <values>PAUSED</values>
</predicates>
</selector>
<reportName>Custom Ad Performance Report</reportName>
<reportType>AD_PERFORMANCE_REPORT</reportType>
<selector>
<dateRange>
  <min>20180801</min>
  <max>20180901</max>
</dateRange>
</selector>
<dateRangeType>CUSTOM_DATE</dateRangeType>
<downloadFormat>CSV</downloadFormat>
</reportDefinition>

Is there anything wrong with the above request body?


HTTP Headers:
developerToken: xxxxxxxxxxxxxxxxxxx
clientCustomerId: xxx-xxx-xxx
Authorization: Bearer <accesstoken>
Content-Type: multipart/form-data; 

I am getting below error message. I've also tried using AWQL instead of XML for reportdefinition still it is returning same error.
Response Body: 
<HTML>
<HEAD>
<TITLE>Bad Request</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Bad Request</H1>
<H2>Error 400</H2>
</BODY>
</HTML>


Luis Xander Talag (AdWords API Team)

unread,
Sep 21, 2018, 1:20:28 AM9/21/18
to AdWords API and Google Ads API Forum
Hi Meghana,

It seems your report definition is correct. I could not see something wrong with it. The error 400 you encountered was more on the connection request to the server. However to better investigate this, could you clarify on how exactly did you create the request? Also, could you provide your clientCustomerID? Please reply via Reply privately to author.

Thanks and regards,
Luis
AdWords API Team
Reply all
Reply to author
Forward
0 new messages