Hello, I am trying to query the AdWords reporting API using the following Google Scripts code:
var params = { headers: { Authorization: 'Bearer ___ACCESS_TOKEN___', developerToken: '___DEVELOPER_TOKEN___', clientCustomerId: '___CUSTOMER_ID_XXXXXXXXXX___' }, muteHttpExceptions: true, '__rdquery' : 'SELECT CampaignName FROM CAMPAIGN_PERFORMANCE_REPORT DURING LAST_7_DAYS', '__fmt' : 'CSV', method:'post' } var url = "https://adwords.google.com/api/adwords/reportdownload/v201402"; Logger.log(params) Logger.log(UrlFetchApp.fetch(url, params)) } The response I get is: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportDownloadError><ApiError><type>ReportDownloadError.MISSING_PARAMETER</type><trigger>Missing report definition</trigger><fieldPath></fieldPath></ApiError></reportDownloadError> I have tried defining the reports in a number of different ways: With and without + between the words of __rdquery, as it is shown here: https://groups.google.com/forum/#!msg/adwords-api/TzvGZxsTIOg/gdhT8WZIg7YJ I have tried with and without URL encoding for the __rdquery and for the authorization token. Could this be an error with my authorization? Or am I failing to define my request correctly? I could not find a client library with any existing code that works in Google Scripts. If there is a resource I could review for accessing the AdWords API using the UrlFetchApp I would be really appreciative. Thank you -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. For more options, visit https://groups.google.com/d/optout.