let report = new AdwordsReport({
developerToken: 'XXXXXXXXXXXX',
userAgent: 'beta:reportDownload/1.0.1',
clientCustomerId: 'XXX-XXX-XXXX',
client_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
client_secret: 'yyyyyyyyyyy',
refresh_token: '1/xxxxxxxxxxxxxxxxxx'
});
report.getReport('v201802', {
reportName: 'Custom Adgroup Performance Report',
reportType: 'CAMPAIGN_PERFORMANCE_REPORT',
fields: ['CampaignId', 'Impressions', 'Clicks', 'Cost'],
filters: [
{ field: 'CampaignStatus', operator: 'IN', values: ['ENABLED', 'PAUSED'] }
],
dateRangeType: 'CUSTOM_DATE', //defaults to CUSTOM_DATE. startDate or endDate required for CUSTOM_DATE
startDate: new Date("2018-04-05"),
endDate: new Date(),
format: 'CSV' //defaults to CSV
}, (error, report) => {
console.log('error:', error);
console.log('report:', report);
});
I have tried to read the related documents and the guide,but still get the error. Please tell me what can I do to sovle this problem.