title: Bing API Authorization not working - The authorization type you provided is not supported. Only Basic and OAuth are supported
body: <p>I recently got an email from Microsoft saying that the Bing API was moving to the Windows Azure Marketplace. It seemed that the main difference between the new request was the authentication.</p>
  
  <p>After reading many posts on forums, I found this:</p>
  
  <pre><code>$accountKey = '#########';
  $api =  'https://api.datamarket.azure.com/Bing/Search/Web?$format=json&amp;$top=8&amp;Query=';
  $context = stream_context_create(array(
      'http' =&gt; array(
          'request_fulluri' =&gt; true,
          'header'  =&gt; "Authorization: Basic " . base64_encode($accountKey . ":" . $accountKey)
      )
  ));
  $request = $api.'%27'.$q.'%27&amp;$skip='.$start;
  $result = file_get_contents($request, 0, $context);
  </code></pre>
  
  <p>However, I still get the error "The authorization type you provided is not supported. Only Basic and OAuth are supported".</p>
  
  <p>Does anyone know how I can fix this. I have also tried cURL and that doesn't work.
  Thanks to anyone who can find me a solution.</p>