2015-10-05 57 views
13

我通过与Spotify的网络API,但 应用尝试auth用户我收到此错误:无效的重定向URI对Spotify的权威性

INVALID_CLIENT: Invalid redirect URI 

网址:

GET https://accounts.spotify.com/authorize/?client_id=6ae90bf75bf748c8874a75d16682f0c5&response_type=code&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback&scope=user-read-private%20user-read-email 

我不能看到哪里是问题...你能帮忙吗?

回答

1

第一。您必须确定您使用app.js授权代码目录。

二。确保你编辑了app.js.第三条线很重要。

var client_id = '---'; // Your client id 
 
var client_secret = '---'; // Your secret 
 
var redirect_uri = 'http://localhost:8888/callback'; // Your redirect uri - EXAMPLE

+0

和你如何阅读它使用? – CashCow

2

app.js:

var redirect_uri = 'http://localhost:8888/callback'; 

的Spotify>我的应用程序:

http://localhost:8888/callback/ 

不要忘记保存。