从 Android 上的 Spotify 获取用户数据

Get user data from Spotify on Android

我想从 spotify 获取当前用户的数据。

文档说我必须使用这个命令:

curl -X GET "https://api.spotify.com/v1/me" -H "Authorization: Bearer {your access token}"

我成功从 Spotify 获取了令牌字符串。 我的问题是: 我应该如何将此 CURL 命令转换为 java?

您需要语言绑定和 HTTP 客户端。 Android client made by Kaaes.

中已经完成了很多这项工作

在您非常具体的情况下,您将使用记录在案的 here. This returns a UserPrivate object, which contains birthdate, product, email, country, as well as the fields available in the UserPublic 对象的 getMe 方法,例如 display_name.

Full documentation