Accessing User Object in Spotify App API
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
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.
Also, by setting to playlists, you can set descriptions for your playlists! Wow!
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.
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.