繁体   English   中英

Spotifyr错误:INVALID_CLIENT:无效的重定向URI

[英]Spotifyr Error: INVALID_CLIENT: Invalid redirect URI

我正在尝试使用spotifyr包从Spotify提取数据,但是任何需要访问令牌的函数均无法正常工作(例如get_my_recently_played(limit = 5))。 运行它时出现以下错误:INVALID_CLIENT:无效的重定向URI。

我什至尝试转到“我的应用程序”并将“重定向URI”更改为“ http:// localhost:8888 / callback / ”,但仍然会出现相同的错误。 我在这里可能会缺少什么? 谢谢!

你有没有尝试过:

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')

尝试在Spotify API客户端设置中将此重定向URL设置为http:// localhost:1410 /

我遇到了同样的问题,此URL现在适用于我

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM