Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的问题有可能以任何方式获取用户 ID?我会从他的名字中搜索一个用户并打印他最近演奏的艺术家
谢谢
这是不可能的,因为 Spotify 的 Web API 没有可以通过用户名获取用户 ID 的端点。
您可以做的是创建一个特定用户可以使用 Spotify 登录的应用程序。之后,您可以使用此端点来检索该确切用户最近播放的曲目。响应中的轨道对象也将包含艺术家。