Skip to content
Tags

Accessing User Object in Spotify App API

January 8, 2012

I recently came across how to access the current user for the Spotify App API.

To access, you need to include the following section in your manifest.json file

"ApiPermissions": {
	"core": ["private"]
}

Then you can use

sp.core.user

which will return an User object

About these ads
5 Comments
  1. yes, but you won’t be able to get an app submitted with it, so i wouldn’t rely on it. sadly they’ve been forced to cut out various features for privacy reasons. hopefully they’ll have a permissions model soon where you can request access to a user’s details, friends, playlists, etc.

    • Ahh, that’s a shame. I was using it for accessing the top tracks, but I haven’t really explored the social namespace yet, so perhaps I can work without it.

  2. Also, by setting to playlists, you can set descriptions for your playlists! Wow!

  3. If you set
    “ApiPermissions”: {
    “core”: ["private"],
    “playlists”:["private"]
    }

    you can use playlist.data.setDescription to add a nice text. I don’t know if this is allowed though.

  4. Hi,

    I want to say that we should not use the function that are mentioned here. They are only for internal use, and I have speak with Ronald yesterday, and he said that we are not allowed to change text on playlists.
    Do not approve my post here, since Spotify does not endorse this code at all. They will turn off this functionality for us, and I suppose we only should deal with those things that are documentated. There is probably a reason why these things has not been mentioned at all, and I believe this is either because it are not endorsed for usage by the public but may also be because the stuff is not ready for public usage yet and will probably be changed, and if gettting public it will be documentatde.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: