HI Anash, I am having a similar issue with trying to download adwords reports using the C# Api. Specifically, I am attempting to use OAuth 2.0 to act as a service account and receive errors similar to the text below:
Report download errors occurred, see errors field for more details. at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToStream(String downloadUrl, Boolean returnMoneyInMicros, String postBody, Stream outputStream) at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReportInternal(String downloadUrl, String postBody, Boolean returnMoneyInMicros, String path) at The resulting CSV files are empty and do not contain any further information. Here is a brief snippet of my code: //Add the user we're going to use as well as the Report Definition. AdWordsUser m_User = new AdWordsUser(); ReportDefinition m_ReportDefinition = new ReportDefinition(); //Specify OAut-specific values: config.AuthorizationMethod = AdWordsAuthorizationMethod.OAuth2; //config.OAuth2ClientId = "##########.apps.googleusercontent.com"; //config.OAuth2ClientSecret = "notasecret"; config.OAuth2Scope = "https://adwords.google.com/api/adwords"; //Specify OAuth-specific config values for service accounts: config.OAuth2Mode = Google.Api.Ads.Common.Lib.OAuth2Flow.SERVICE_ACCOUNT; config.OAuth2ServiceAccountEmail = "###########@developer.gserviceaccount.com"; config.OAuth2PrnEmail = "#####@frstia.co.za"; config.OAuth2CertificatePath = @"C:\keys\#######-privatekey.p12"; config.OAuth2CertificatePassword = "notasecret"; m_ReportDefinition.reportName = m_ReportName; //m_ReportDefinition.reportName = "Test Report"; //Search for appropriate enum of report type and assign it. ReportDefinitionReportType rtype = (ReportDefinitionReportType)System.Enum.Parse(typeof(ReportDefinitionReportType), m_ReportType); m_ReportDefinition.reportType = (ReportDefinitionReportType)rtype; m_ReportDefinition.downloadFormat = DownloadFormat.CSV; m_ReportDefinition.selector = selector; m_ReportDefinition.includeZeroImpressions = true; #region Invoke Report //try //{ string reportName = "unspecified name"; string fullReportPath = ""; if (!String.IsNullOrEmpty(Variables.FileDownloadLocation.ToString())) { fullReportPath = Variables.FileDownloadLocation.ToString(); } else { ComponentMetaData.FireError(10, "Component Variables", "TheFileDownloadLocation variable is NULL or empty", "", 0, out cancel); } if (!string.IsNullOrEmpty(m_ReportName)) { reportName = m_ReportName; } fullReportPath += "\\" + m_ReportName + ".csv"; ReportUtilities utilities = new ReportUtilities(m_User); utilities.ReportVersion = "v201306"; utilities.DownloadClientReport(m_ReportDefinition, fullReportPath); Any help would be greatly appreciated. Thanks, Gerhard On Wednesday, August 14, 2013 11:11:53 AM UTC+2, Anash P. Oommen (AdWords API Team) wrote: > > Hi Chris, > > Is the issue resolved? Could you post a code snippet that shows the issue? > > Cheers, > Anash P. Oommen, > AdWords API Advisor. > > On Saturday, August 3, 2013 12:20:44 AM UTC+5:30, Chris Jenkins wrote: >> >> I'm just starting to dig into the api and I'm having an issue when I'm >> calling reports. I've tried various reports, but they all fail. I'm sure it >> has something to do with the way I'm setting it up, but the exception it >> throws never has anything in the error. It just says this: >> >> Google.Api.Ads.AdWords.Util.Reports.ReportsException was caught >> HResult=-2146233088 >> Message=Report download errors occurred, see errors field for more >> details. >> Source=Google.AdWords >> StackTrace: >> at >> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToStream(String >> >> downloadUrl, Boolean returnMoneyInMicros, String postBody, Stream >> outputStream) in c:\src\MyProjects\now\Common library >> base\adwords\compile\Util\Reports\ReportUtilities.cs:line 301 >> at >> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.GetClientReportInternal(String >> >> downloadUrl, String postBody, Boolean returnMoneyInMicros) in >> c:\src\MyProjects\now\Common library >> base\adwords\compile\Util\Reports\ReportUtilities.cs:line 231 >> at >> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.GetClientReport[T](T >> reportDefinition, Boolean returnMoneyInMicros) in >> c:\src\MyProjects\now\Common library >> base\adwords\compile\Util\Reports\ReportUtilities.cs:line 153 >> at GoogleAPI.Reports.Campaign_Daily.Get(AdWordsUser user) in >> c:\Users\ChrisJ\Documents\Visual Studio >> 2012\Projects\GoogleAPICodeTest\Reports\Campaign_Daily.cs:line 60 >> InnerException: >> >> >> The errors field in the exception viewer only shows me where the >> exception came from, but otherwise it's null...any ideas? >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out.