title: WP REST API ERROR 401 While trying to fetch image from wp:featuredmedia
body: <p>I'm trying to fetch featured image from my published post but it seems impossible! I get
  an error :( that's the code: </p>
  
  <pre><code>function fetchSlideShow(){
  let endpoint = "http://loreleiheckmann.com/wordpress/wordpress/wp-json/wp/v2/Vinyls?_embed";
  fetch(endpoint)
  .then(e =&gt; e.json())
  .then(showSlideShow);
  }
  
  function showSlideShow(data){
  console.log(data);
  data.forEach(showSingleSlide);   
  showSlides();
  }
  
  function showSingleSlide(aSlide) {
  let template = document.querySelector(".slide_template").content;
  let clone = template.cloneNode(true);
  console.log(aSlide);  
  clone.querySelector("img").setAttribute("src", aSlide._embedded["wp:featuredmedia"] 
  [0].media_details.source_url);
  
  let SlideList = document.querySelector("#SlideList");
  SlideList.appendChild(clone);
  }
  </code></pre>
  
  <p>While going to the array I see error 401 :( and moreover: Cannot read property 'source_url' of undefined" I don't know what I'm doing wrong .. any insights?
  <a href="https://i.stack.imgur.com/KPWMj.png" rel="nofollow noreferrer">HERE ARE THE ERRORS -> 401 ON CONSOLE + PROBLEM WITH URL.:</a></p>