Error creating resource: [message] fopen(https://adwords.google.com/api/adwords/reportdownload/v201806): failed to open stream: HTTP request failed!

340 views
Skip to first unread message

mubbashar husain

unread,
Oct 15, 2018, 11:54:19 PM10/15/18
to AdWords API and Google Ads API Forum
Hi,

I am getting this error for one of my client when I am trying to download the Shopping performance report. I have already contacted the Adwords API team and they this was their response


Upon checking with the team, the issue could be due to the size of the report. Could you try on your end to add more predicates on generating the report so the report size gets reduced? an example would be to generate the report based on only one ad group. If the issue still persists, I suggest reaching out to PHP client library owners in this link since the error message ("failed to open stream: HTTP request failed!") that you received is more on the client library and the library owners are better equipped to provide support for client library specific issues/concerns. 



Here is the PHP code I am using. And it is working for all of my client except one client. I have SOAP request and everything is available. 
try {
    $reportDownloadResult = $reportDownloader->downloadReportWithAwql($templateQuery, DownloadFormat::GZIPPED_CSV);
    $reportDownloadResult->saveToFile($filePath);
} catch (cm\ApiException $e) {
    @unlink($filePath);
} catch (\Exception $e) {
    @unlink($filePath);
}


I got an error on the above redline of the code


GuzzleHttp/Exception/RequestException with message 'Error creating resource: [message] fopen(https://adwords.google.com/api/adwords/reportdownload/v201806): failed to open stream: HTTP request failed! 
[file] /home/vagrant/code/googleadwords/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php


Let me know if you need anything from my side to debug this issue.

thanks!

Peter Oliquino (AdWords API Team)

unread,
Oct 16, 2018, 2:17:54 AM10/16/18
to AdWords API and Google Ads API Forum
Hi,

So I can better identify the cause of the issue, could you provide to me the clientCustomerId and the complete report definition that were used to generate your report? You may reply to me via the Reply privately to author option.

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