[GH-ISSUE #151] getUserPlaylists() doesn't return restored playlists #96

Closed
opened 2026-02-27 19:26:01 +03:00 by kerem · 7 comments
Owner

Originally created by @TristanCottam on GitHub (Feb 8, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/151

getUserPlaylists() doesn't seem to return restored deleted playlists, while the Spotify console clearly does. Any fix/workaround ?

Originally created by @TristanCottam on GitHub (Feb 8, 2019). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/151 **getUserPlaylists()** doesn't seem to return restored deleted playlists, while the Spotify console clearly does. Any fix/workaround ?
kerem closed this issue 2026-02-27 19:26:01 +03:00
Author
Owner

@jwilsson commented on GitHub (Feb 8, 2019):

Hi!
That sounds really strange, it's the same call being made. Have you granted the same scopes to your PHP app and the console? And are you using some limit/offset in one place and not the other?

<!-- gh-comment-id:461923018 --> @jwilsson commented on GitHub (Feb 8, 2019): Hi! That sounds really strange, it's the same call being made. Have you granted the same scopes to your PHP app and the console? And are you using some limit/offset in one place and not the other?
Author
Owner

@TristanCottam commented on GitHub (Feb 11, 2019):

Actually, I noticed getUserPlaylists() only displays non-restored playlists owned by the user, and not followed playlists, as opposed to the console.

I tried setting the same scopes in the console as in my app (even though none are required to get a user's playlists, but just in case), and only setting the limit option in both to 50 (to get all my playlists, I have less than 50), I'm still having the same problem.

I also tried restoring other random deleted playlists, and saw the same problem.

<!-- gh-comment-id:462284049 --> @TristanCottam commented on GitHub (Feb 11, 2019): Actually, I noticed **getUserPlaylists()** only displays non-restored playlists owned by the user, and not followed playlists, as opposed to the console. I tried setting the same scopes in the console as in my app (even though none are required to get a user's playlists, but just in case), and only setting the **limit** option in both to 50 (to get all my playlists, I have less than 50), I'm still having the same problem. I also tried restoring other random deleted playlists, and saw the same problem.
Author
Owner

@jwilsson commented on GitHub (Feb 11, 2019):

Hmm. If you request it using cURL straight from the command line, what do you get back then? I think the console shows the cURL command, right?

<!-- gh-comment-id:462354315 --> @jwilsson commented on GitHub (Feb 11, 2019): Hmm. If you request it using cURL straight from the command line, what do you get back then? I think the console shows the cURL command, right?
Author
Owner

@TristanCottam commented on GitHub (Feb 11, 2019):

Yes it does, doing that I also get to see my restored and followed playlists.

<!-- gh-comment-id:462416759 --> @TristanCottam commented on GitHub (Feb 11, 2019): Yes it does, doing that I also get to see my restored and followed playlists.
Author
Owner

@jwilsson commented on GitHub (Feb 12, 2019):

Thanks for working this one through with me! This is really strange, but I'll take a closer look tonight.

<!-- gh-comment-id:462621955 --> @jwilsson commented on GitHub (Feb 12, 2019): Thanks for working this one through with me! This is really strange, but I'll take a closer look tonight.
Author
Owner

@jwilsson commented on GitHub (Feb 12, 2019):

Okay, I think I've found the issue. When restoring a deleted playlist, it's always set to private. No matter the previous visibility of it.

I managed to get a list of my restored playlists using getUserPlaylists() and through the console when requesting the playlist-read-private scope but not without it. If I were you, I'd open an issue on https://github.com/spotify/web-api since this doesn't seem to be an issue with this library.

<!-- gh-comment-id:462881988 --> @jwilsson commented on GitHub (Feb 12, 2019): Okay, I think I've found the issue. When restoring a deleted playlist, it's always set to private. No matter the previous visibility of it. I managed to get a list of my restored playlists using `getUserPlaylists()` and through the console when requesting the `playlist-read-private` scope but not without it. If I were you, I'd open an issue on https://github.com/spotify/web-api since this doesn't seem to be an issue with this library.
Author
Owner

@TristanCottam commented on GitHub (Feb 14, 2019):

Alright, so it seams I was wrong about the scopes I set for the OAuth token in the console, sorry about that 😕

But I had read while looking for a solution that Spotify never deletes playlists, it just sets them as private and makes you unfollow them, so the only way to access them is through the account page, which explains why.

I posted on Spotify's forum, since it seems like more of a problem with Spotify itself rather than it's API, and also since they hardly seem active over there.

<!-- gh-comment-id:463434637 --> @TristanCottam commented on GitHub (Feb 14, 2019): Alright, so it seams I was wrong about the scopes I set for the OAuth token in the console, sorry about that 😕 But I had read while looking for a solution that Spotify never deletes playlists, it just sets them as private and makes you unfollow them, so the only way to access them is through the account page, which explains why. [I posted on Spotify's forum](https://community.spotify.com/t5/forums/postpage/board-id/002), since it seems like more of a problem with Spotify itself rather than it's API, and also since they hardly seem active over there.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-web-api-php#96
No description provided.