title: IMGUR API - Permission Denied
body: <p>I am using the IMGUR API and I get the following error</p>
  
  <blockquote>
    <p>Warning: file_get_contents(<a href="https://api.imgur.com/3/album/f0J59/images" rel="nofollow">https://api.imgur.com/3/album/f0J59/images</a>): failed to open stream: HTTP request failed! HTTP/1.1 403 Permission Denied in C:\wamp\www\reddit_cards\imgur_test.php on line 12</p>
  </blockquote>
  
  <pre><code>$opts = array(
      'http'=&gt;array(
      'method'=&gt;"POST",
      'header'=&gt;"Authorization: Client-ID XXXXX"
      )
   );
  
  $context = stream_context_create($opts);
  
   $file = file_get_contents('https://api.imgur.com/3/album/f0J59/images', false, $context);
   echo $file;
  </code></pre>