title: Error 401 in youtube data api v3 in angular 8
body: <p>I'm using youtube data Api v3 to display videos from a channel on my page in angled. the problem is that this is returning error 401 only in the request made by the angular, if sent by the browser or by the postman, I get the correct return josn.</p>
  
  <p>I've tried with and without the header in the request.
  My method is this:</p>
  
  <pre><code> getVideos() : Observable&lt;Object&gt;{
    let headers = new HttpHeaders();
      headers.append('Content-Type', 'multipart/form-data');
      headers.append('Accept', 'application/json');
  
    return this.http.get(`https://www.googleapis.com/youtube/v3/search?part=snippet&amp;key=${this.apiKey}&amp;channelId=${this.channelId}`, { headers: headers }).pipe(
        map(res =&gt; console.log(res)),
        catchError(this.handleError)
      )
  }
  
      getVideos(): Observable&lt;Object&gt; {
  
      return this.http.get(`https://www.googleapis.com/youtube/v3/search?part=snippet&amp;key=${this.apiKey}&amp;channelId=${this.channelId}`)
        .pipe(map((res) =&gt; {
          console.log('res',res);
          return res;
        }));
  
    }
  </code></pre>
  
  <p>Has anyone had the same problem or can you help me?</p>