Bing Ads API: Error Fetching http headers

Hots Hots 1 Reputation point
2021-03-31T09:52:21.737+00:00

We use bingads PHP lib. Sometimes, when we try to make a call using GetCampaignCriterionsByIds or AddCampaignCriterions methods we get "Error Fetching http headers" but when repeat call we get success. Why does it happen? What does this error mean exactly?

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
402 questions
{count} votes

3 answers

Sort by: Most helpful
  1. BDJobsFeed.com 1 Reputation point
    2021-04-10T21:08:59.393+00:00

    Today I am facing same issue for Ads running on my site https://bdjobsfeed.com/

    0 comments No comments

  2. Eric Urban - MSFT 626 Reputation points Microsoft Employee
    2021-04-11T12:49:22.667+00:00

    The error seems not specific to the Bing Ads API.

    There are some suggestions in this stackoverflow thread.

    In case it helps we will be updating the PHP SDK for passing custom options to SoapClient. In the meantime you can modify your local copy as needed here.


  3. Eric Nagel 1 Reputation point
    2021-04-15T22:34:45.67+00:00

    So this isn't a solution to the problem, but it's a work around that's working for me:

    $failed = false;
    do {
        try {
            $poll_response = $this->ServiceClient->GetService()->PollGenerateReport($request);
            $failed = false;
        }
        catch(\Exception $e) {
            $failed = true;
        }
    } while ($failed);
    
    0 comments No comments