hakanw
hakanw

Reputation: 284

How to create a playlist and get the URI of it in a spotify apps API?

It is possible to create a playlist (new Playlist(name)) with the spotify apps API, but the URI field of the new playlist is always null. Anyone know how to get around this, or otherwise reference the new playlist?

Without an URI I can't create a "share" button within the app, since I need the URI in order to reference it.

Anyone know if this is a bug or feature?

I just discovered that spotify removed the ability to read user playlists for privacy reasons[1], so now I'm wondering if this is a design decision or simply a bug. After all, the playlist in question was created in our app, so I should be able to get the URI of it?

1: Spotify Apps API: Library-class won't return users Playlists

Upvotes: 4

Views: 4729

Answers (1)

iKenndac
iKenndac

Reputation: 18776

Unfortunately, the URI property will only be filled if you instantiate the playlist with a URI given to you, like:

models.Playlist.FromURI("totally a valid URI");

Unfortunately, this is because playlist URIs contain the username of the creator, and we're not allowed to release personally-identifying information through our API.

We hope to change this in the future.

Upvotes: 5

Related Questions