title: spotify application requests authorization
body: <p>I am trying to get 'access token' from spotify with the following code.</p>
  
  <pre><code>    var encoded = btoa(client_id+':'+client_secret);
      function myOnClick() {
         console.log('clikced!');
         $.ajax({
         url: 'https://accounts.spotify.com/api/token',
         type: 'POST',
         data: {
              grant_type : "client_credentials",
             'Content-Type' : 'application/x-www-form-urlencoded'
         },
         headers: {
             Authorization: 'Basic ' + encoded
         },
         dataType: 'json'
         }).always((data)=&gt; console.log(data));
         }
  </code></pre>
  
  <p>however I keep getting errors: </p>
  
  <pre><code>    Cross-Origin Request Blocked: The Same Origin Policy disallows reading
      the remote resource at https://accounts.spotify.com/api/token.
      (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
  </code></pre>
  
  <p>and 
          readyState: 0, status: 0</p>