Spotify API 一直认为 redirect_url 无效
Spotify API Always thinks redirect_url is invalid
所以到目前为止,我已经尝试授权一个应用程序使用 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。我已在应用程序管理面板中将以下网址列入白名单:
- http://localhost/callback
- http://localhost
- http://localhost:80/callback
- localhost:80/回调/
- http://localhost/callback/
- http://localhost:/callback/
- http://127.0.0.11.4k
- http://127.0.0.1
- http://127.0.0.1/
- http://127.0.0.1/callback/
- http://localhost.me
- http://localhost/
有没有人运行解决过这个问题?
(编辑:localhost.me 试图通过修改主机来使用非 localhosty 的东西)
所以。在尝试了很多无用的方法来解决这个问题后,我回到了应用程序管理页面。事实证明,当您输入 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。我已在应用程序管理面板中将以下网址列入白名单:
- http://localhost/callback
- http://localhost
- http://localhost:80/callback
- localhost:80/回调/
- http://localhost/callback/
- http://localhost:/callback/
- http://127.0.0.11.4k
- http://127.0.0.1
- http://127.0.0.1/
- http://127.0.0.1/callback/
- http://localhost.me
- http://localhost/
有没有人运行解决过这个问题?
(编辑:localhost.me 试图通过修改主机来使用非 localhosty 的东西)
所以。在尝试了很多无用的方法来解决这个问题后,我回到了应用程序管理页面。事实证明,当您输入 URL 并单击“添加”时,它们并没有被列入白名单,而是当您向下滚动到页面底部并点击“保存”时。直到那时我才离开或向下滚动。您需要保存的警告位于保存按钮下方。