尝试获取Spotify API的访问令牌时出现CORS错误。我遵循他们的tutorial中概述的隐式授予流程协议。我正在使用一个简单的jquery get调用到端点,并提供我的client_id,redirect_url和response_type,如下面的代码所示:
var myclient_id = '9e6348e49597448c94d30d713a67d0c6';
var myredirect_uri = 'https://wustlcse204.github.io/10-final-project-evan-dhillon/';
$.get( "https://accounts.spotify.com/authorize", {
client_id: myclient_id,
redirect_uri: myredirect_uri,
response_type: "token"
} )
.done(function( data ) {
console.log(data);
});