r - Spotifyr 错误:INVALID_CLIENT:重定向 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')
推荐阅读
- string - 使用 listGetAt 分隔符获取字符串
- r - 在 RSelenium 中处理日历弹出窗口
- javascript - 如何检查 JSON.parse() 的输入在 ejs 中是否有效
- python - 如何使用 Pydantic 验证复杂的嵌套数据结构?
- python - asyncio loop.run_until_complete 在使用 loop.run_in_executor 从 asyncio.gather 返回所有结果之前完成
- xml - 使用 awk 编辑特定标签下的值
- django - 无法将关键字“电话”解析为字段 django
- c++ - 将 HEXA 64 位数字转换为 int
- react-native - React Native run-android on Apple M1 芯片抛出错误,“无法为脚本打开 dsl 通用类缓存”
- javascript - 单击按钮时数字不更新。控制台还给出了“游戏”未再次定义的错误。任何帮助表示赞赏