Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Api to create a private playlist doesn't work

Solved!

Api to create a private playlist doesn't work

Plan

Premium

Country

US

 

Device

iPhone 13

Operating System

iOS 15

 

My Question or Issue

I'm hitting the API to create a playlist 

 

POST: "/users/\(userId)/playlists"

 

with isPublic=false and isCollaborative=false in the body. The playlist is created successfully but is public instead of private. The scopes I have authorized are [playlistModifyPublic and playlistModifyPrivate]

Reply

Accepted Solutions
Marked as solution

Let's recap once more.

Before, Spotify playlists could be private or publicPublic meant it was published to your user profile, private meant that it was not published to your user profile, however it could still be accessed via the URI/URL.

A few years ago, Spotify improved this for their applications, and introduced the possibility for a playlist to be truly private, which would mean that even if others had the URI/URL, they could not access your playlist.  They decided that this was a better representation of what public/private meant, so in the applications, the public/private toggle would toggle this state instead.

The previous public/private states, which was more accurately a reflection of whether the playlist was published on your profile, was renamed in the apps to "Publish on profile".

While Spotify made this change in the applications, they have not (yet) moved this into the Web API functionality, so in the Web API, the public/private boolean represents whether it is published on a users page, and there is no functionality to allow users to toggle the new (true) public/private state.

View solution in original post

33 Replies

I wrote "isPublic" and "isCollaborative" but the keys I am sending are "public" and "collaborative"

I'm having the same issue. The response to my POST request says the new playlist is private (public:false), but in Spotify app the playlist is public.

I'm having the same issue. The response to my POST request says the new playlist is private (public:false), but in Spotify app the playlist is public.

Same issue here. The create playlist API is called and even returns public: false, but when you go on spotify it is public. My scopes are correct as well.

Same/similar issue here. It seems to me like the behaviour/data of the public/private setting is inconsistent in general. I have public and private playlists in my Spotify account, but they are all shown as private (public: false) in the API. When changing it to public: true or public: false using the API, there's no change in the Spotify app. Looks to me like the public setting API is without any function.

That's because before a curtain date, there were only two types of privacy states: "On profile" called "public" and "Not on profile" called "private". After the addition of real private playlists in app, they did change anything of the API, so the "private" of the API still means "Not on profile". Also, they haven't added the functionality to make a real private playlist yet.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Same issue here with same parameters and same scope

Same issue for me, hope they will fix this soon

Same issue here. 

Still having the same issue now.

The script or program needs to get an OAuth Token it gets through the Authorization Code Flow with the scopes playlist-modify-public and playlist-modify-private.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

I have those auth-scopes selected. It still does not work though

Okay. Have you read my previous comment?

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

I have the same issue. It's not an implementation issue as it's the same issue with the console.

Reproduction: 

  1. Go to https://developer.spotify.com/console/post-playlists
  2. Request a new access token with the 2 required scopes
  3. Create a playlist with "public: false" like:

 

{
  "name": "Private playlist",
  "description": "New playlist description",
  "public": false
}

 

The playlist is public anyway:

thomasngrlt_0-1676919993396.png

 

The API documentation is pretty clear:

public boolean

Defaults to true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope


I read @Ximzend comment but all this "on profile" seems very complicated. In app we have the option to toggle between "private" and "public" playlists, the api doc give us a "public" boolean saying that sending "false" will create a "private" playlist but it does not. It seems like a bug on the API side, can we expect a fix ?

The API and documentation are outdated. There's no way to create a private playlist yet; only playlists that are not displayed on profile.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

I am experiencing the same issue. The App interprets the "public:false" playlists generated via the API as "Public Playlist". However, they don't appear on the user's public profile. So there is some level of privacy. I think the App (mobile and desktop) interpret {public:false} flag as "do not list on user's profile". 

I am surprised that the issue was reported 10 months ago but there hasn't been a fix. Is there an issue tracking system where this bug can be submitted and tracked? 

@kgmodi, if you want to place a playlist on someone's profile, public should be true.

Playlists can't be private and on a profile at the same time.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Same issue here. Any way for us to track this?

 

Why is public=False even allowed using the playlist-modify-private scope? It seems counter intuitive. 

I was able to verify that with public=false, you can still place have the playlist on the user's profile. However, if someone access the user profile using https://open.spotify.com/user/{userId} they won't be able to see the public=false playlists. 

Suggested posts