我尝试使用spotifyr包从Spotify中提取数据,但是任何需要访问令牌的函数都不起作用(例如get_my_recently_played(limit = 5))。当我运行它时,我得到了以下错误: INVALID_CLIENT:无效的重定向URI。
我甚至尝试转到我的应用程序,并将重定向URI更改为“http://localhost:8888/callback/”,但它仍然给出相同的错误。这里我可能遗漏了什么?谢谢!
发布于 2018-08-27 01:41:06
您是否尝试过:
Sys.setenv(SPOTIFY_CLIENT_ID = 'xxxxxxxxxxxxxxxxxxxxx')
Sys.setenv(SPOTIFY_CLIENT_SECRET = 'xxxxxxxxxxxxxxxxxxxxx')
access_token <- get_spotify_access_token()
根据https://github.com/charlie86/spotifyr上的自述文件
更新:
This works for me with the version of `spotifyr` available on CRAN
Sys.setenv(SPOTIFY_CLIENT_ID = 'your_client_id_here')
Sys.setenv(SPOTIFY_CLIENT_SECRET = 'your_client_secret_here')
access_token <- get_spotify_access_token()
library(spotifyr)
get_artist_audio_features('the beatles')
发布于 2018-09-11 21:48:54
尝试在Spotify API客户端设置中将此重定向URL设置为http://localhost:1410/
我也遇到了同样的问题,这个URL现在对我有效
https://stackoverflow.com/questions/52028686
复制相似问题