erbal
erbal

Reputation: 727

Get user data from Spotify on Android

I want to get the current user's data from spotify.

The documentation says I have to use this command:

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

I successfully get the token string from Spotify. My question is: How should I transform this CURL command to java?

Upvotes: 0

Views: 683

Answers (1)

Michael Thelin
Michael Thelin

Reputation: 4830

You need language bindings and an HTTP client. A lot of this work has been done already in the Android client made by Kaaes.

In your very specific case, you'd use the getMe method as documented here. This returns a UserPrivate object, which contains birthdate, product, email, country, as well as the fields available in the UserPublic object, like display_name.

Full documentation

Upvotes: 1

Related Questions