title: Why am I Getting 401 Unauthorized response from unsplash.com when i do an API request with react.js?
body: <p>i've tried to do an API request to unsplash from react.js, it works when i pass the access key using a client_id query parameter like so</p>
  <pre><code>axios.get(&quot;https://api.unsplash.com//search/photos/?client_id=YOUR_ACCESS_KEY&quot;
  </code></pre>
  <p>but it doesn't work when i do it via the HTTP Authorization header like so</p>
  <pre><code>onSearchSubmit(term) {
  axios.get(&quot;https://api.unsplash.com//search/photos&quot;, {
    params: { query: term },
    header: {
      Authorization: &quot;Client-ID Yme6ZcumIXpWryQ0DPc249CE0ua2Mxh66Y-4W2gPAAc&quot;,
    },
    
  });
  </code></pre>
  <p>}</p>
  <p>it shows me this error</p>
  <pre><code>&quot;OAuth error: The access token is invalid&quot;
  </code></pre>