title: How to use the youtube api sample code in php?
body: <p>So my question is as follows: I am trying to use the add_channels code sample from <a href="https://developers.google.com/youtube/v3/code_samples/php" rel="nofollow noreferrer">https://developers.google.com/youtube/v3/code_samples/php</a> </p>
  
  <p>I went ahead and made an API key, along with both an OAuth client ID and secret. I am trying to run this locally only using xampp, which is where I stored the git repo they have as an example. So xampp/htdocs/youtubeAPI/sample-apps/php</p>
  
  <p>However, everytime I run it I get: </p>
  
  <pre><code>Authorization Required
  
  You need to authorize access before proceeding.
  </code></pre>
  
  <p>What authorization? I added the full path to my authorized redirect URIs: <a href="http://localhost/youtubeAPI/api-samples/php/add_channel_section.php" rel="nofollow noreferrer">http://localhost/youtubeAPI/api-samples/php/add_channel_section.php</a> what more do they need? I am somewhat lost as to how to use this API since our professor explained it by showing a youtube video of it at work and that's about it. </p>