2017-02-16 72 views
0

所以我试图授权应用程序使用Spotify API的几种方式,但无论它说什么无效的redirect_url。Spotify API始终认为redirect_url无效

<a href="https://accounts.spotify.com/authorize/?client_id=bed1f08b5dec405888c5c66c0e7b35ef& 
response_type=code&redirect_uri=http://localhost/callback&scope=user-read-private%20user-read-email& 
state=34fFs29kd09">Authorize Spotify</a> 

此外,我试图从Exportify(https://github.com/watsonbox/exportify)借用代码:

authorize: function() { 
    client_id = "bed1f08b5dec405888c5c66c0e7b35ef" 
    window.location = "https://accounts.spotify.com/authorize" + 
     "?client_id=" + client_id + 
     "&redirect_uri=" + encodeURIComponent([location.protocol, '//', location.host, location.pathname].join('')) + 
     "&scope=playlist-read-private%20playlist-read-collaborative" + 
     "&response_type=token"; 
} 

但是我还是无效REDIRECT_URL。我已经列入白名单以下URL在应用程序管理面板:

有没有人遇到和解决这个问题?

(编辑:localhost.me是通过修改主机使用不localhosty什么企图)

回答

1

所以。在尝试解决这个问题的很多徒劳的方法后,我回到了应用程序管理页面。事实证明,当您键入URL并单击添加时,URL并未列入白名单,而是当您向下滚动到页面底部并点击保存时。直到那时我还没有离开或滚动。通过保存按钮,您需要保存的警告有利于低于折叠。

+0

嘿@BWStearns,对不起你遇到了这个问题。我们意识到这一点,现在我们正在进行修复。 –

+0

@HughRawlinson不用担心!我认为,如果警告是在页面的顶部,或者至少在页面上方,没有人会遇到这个问题(回顾我在解决这个问题时发现的帖子,我认为其他人也碰到过)。非常感谢您的支持! (在我的回答中,我的意思并不是很尖锐,我真的很累!) – BWStearns