2015-10-05 64 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/ 

不要忘記保存。