title: Getting a 403 error while using Axios in React
body: <p>Hey great people of StackOverflow,</p>
  
  <p>I'm creating a React app that uses the Google API, and I'm getting a 403 error when I use the search tool I've built, here's the following code: </p>
  
  <pre><code>import axios from 'axios'; 
  
  const KEY = 'API KEY';
  
  export default axios.create({
      baseURL: 'http://www.googleapis.com/youtube/v3',
      params: {
        part: 'snippet', 
        maxResults: 5,
        key: KEY
    }
  });
  </code></pre>
  
  <p>That's the API component to my React project, in my App.js, the callbacks look like this: </p>
  
  <pre><code>import React from 'react'; 
  import SearchBar from './SearchBar';
  import youtube from '../apis/youtube'; 
  
  class App extends React.Component {
      onTermSubmit = (term) =&gt; {
      youtube.get('/search', {
      params: {
          q: term 
        }
      });
  };
  </code></pre>
  
  <p>I thought it might have been one of the EventHandlers not going through with "submit" but that wasn't the case as I was able to look at the Dev Console and I isolated XHR requests in the Network, and this is what I got: </p>
  
  <pre><code>Request URL: http://www.googleapis.com/youtube/v3/search?part=snippet&amp;maxResults=5&amp;key=MYAPIKEY
  Request Method: GET
  Status Code: 403 Forbidden
  </code></pre>
  
  <p>Any help would be greatly appreciated, thank you folks in advance. </p>