Failing to Download reports using v201406

121 views
Skip to first unread message

Vandita Chhabaria

unread,
Jul 14, 2015, 7:07:34 AM7/14/15
to adwor...@googlegroups.com
Hello,

I am using AWQL in my c# console application to download adwords report which was working fine since a year and suddenly I am getting Exception in downloading report:

Code I am using:

                string reportDate = startDate.ToString("yyyyMMdd");

                string adQuery = "SELECT " +
                                    "CampaignName, AdGroupName, Id " +
                                    "FROM  AD_PERFORMANCE_REPORT " +
                                    "DURING " + reportDate + ", " + reportDate;

                string query = "SELECT " +
                                "CampaignName, AdGroupName, PlacementUrl, MaxCpc, Impressions, Clicks, Conversions, Cost " +
                                "FROM  PLACEMENT_PERFORMANCE_REPORT " +
                                "WHERE AdNetworkType1 = 'CONTENT' " +               // 'CONTENT' indicated only Display Networs
                                "DURING " + reportDate + ", " + reportDate;

                try
                {
                    // Download the report
                    ReportUtilities utilities = new ReportUtilities(user);
                    utilities.ReportVersion = "v201406";
                    utilities.DownloadClientReport(query, DownloadFormat.CSV.ToString(), filePath);
                    utilities.DownloadClientReport(adQuery, DownloadFormat.CSV.ToString(), adFilePath);
                }
                catch (Exception ex)
                {
                    throw new System.ApplicationException("Failed to download report.", ex);  // I am getting exception here
                }


Exception:
System.ApplicationException: Failed to download report. ---> Google.Api.Ads.AdWords.Util.Reports.ReportsException: Report download errors occurred, see errors field for more details. at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToStream(String downloadUrl, Nullable`1 returnMoneyInMicros, String postBody, Stream outputStream) in z:\Git\google3\third_party\dotnet_src\adsapi\compile\Util\Reports\ReportUtilities.cs:line 314 at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReportInternal(String downloadUrl, String postBody, Nullable`1 returnMoneyInMicros, String path) in z:\Git\google3\third_party\dotnet_src\adsapi\compile\Util\Reports\ReportUtilities.cs:line 264 at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport(String query, String format, Nullable`1 returnMoneyInMicros, String path) in z:\Git\google3\third_party\dotnet_src\adsapi\compile\Util\Reports\ReportUtilities.cs:line 192 at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport(String query, String format, String path) in z:\Git\google3\third_party\dotnet_src\adsapi\compile\Util\Reports\ReportUtilities.cs:line 170 at AdWordsDataScript.Program.LoadData(DateTime startDate, DateTime endDate) in c:\svn_trainee\AdWords\AdWordsDataScript\AdWordsDataScript\Program.cs:line 741 


Please help me asap as this thing is creating a big delay in taking decisions !

Thanks
Vandita

Anthony Madrigal

unread,
Jul 14, 2015, 4:04:56 PM7/14/15
to adwor...@googlegroups.com, chhabari...@gmail.com
Hi Vandita,

Could you please send me your SOAP request through Reply privately to author?

Regards,
Anthony
AdWords API Team

Anthony Madrigal

unread,
Jul 15, 2015, 3:03:43 PM7/15/15
to adwor...@googlegroups.com, chhabari...@gmail.com
Hi Vandita,

AdWords API v201406 has been sunset and is unavailable to use. Could you please download AdWords API v201506 from one of our client libraries

Once you do, let me know if you are still running into these errors.

Thanks,
Anthony
AdWords API Team

Vandita Chhabaria

unread,
Jul 16, 2015, 5:58:28 AM7/16/15
to adwor...@googlegroups.com, chhabari...@gmail.com
Hey Thanks, I have updated my client Library but now I am getting exception regarding Access token :

Failed to refresh access token.
{
  "error" : "invalid_client",
  "error_description" : "The OAuth client was not found."
}


Now what is the Issue with Oauth Token ?
Please help asap !

Vandita Chhabaria

unread,
Jul 16, 2015, 7:16:28 AM7/16/15
to adwor...@googlegroups.com

I am also attaching my soap requests also
request_info.log
soap_xml.log

Anthony Madrigal

unread,
Jul 16, 2015, 12:43:48 PM7/16/15
to adwor...@googlegroups.com, chhabari...@gmail.com
Hi Vandita,

It appears your client_id was not filled, which is why the placeholder INSERT_OAUTH2_CLIENT_ID_HERE is set as the value. You will need to modify your App.config file with your Credentials such as client_id.

Vandita Chhabaria

unread,
Jul 17, 2015, 11:53:33 PM7/17/15
to adwor...@googlegroups.com, chhabari...@gmail.com
I needed to refresh my OAuth token and replace report variable names as per v201506.

Thanks for your support ! :)
Reply all
Reply to author
Forward
0 new messages