title: Is it possible to use the Chrome API within a content script?
body: <p>I am currently trying to download a file through a content script. However, it appears to be doing nothing. I have also tried to send a message to my background script and then download it from the background file, however it appears no message  was received. </p>
  
  <pre><code>chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
      if(message == "handle_all") {
          let is_playing = document.getElementsByClassName("playControl")[0].innerHTML == "Pause current";
          let volume = document.getElementsByClassName("volume__sliderWrapper")[0].getAttribute('aria-valuenow');
  
          SC.initialize({
              client_id: 'censored',
          });
  
          if(is_playing) {
              SC.resolve('https://soundcloud.com/moow-beatmaker/it-wasnt-me').then(function(track) {
                  chrome.downloads.download({
                      url: "track.download_url + '?client_id=censored'",
                  });
              });
          }
      }
  });
  </code></pre>
  
  <p>Nothing happens. No download, nothing. When I visit the download page myself I get error code 406 'Not Acceptable'. </p>
  
  <p>Is this an issue with not being able to use the Chrome API within a content script or is there an issue with the API I am downloading the file from?</p>