Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Missing playlists in Get a List of a User's Playlists endpoint #87

Closed
blackarcanis opened this issue Jul 19, 2015 · 19 comments
Closed

Missing playlists in Get a List of a User's Playlists endpoint #87

blackarcanis opened this issue Jul 19, 2015 · 19 comments

Comments

@blackarcanis
Copy link

Hi,
Here MAGNANO Thomas, from Soundiiz, the playlists converter.
We've got a strange issue when we get playlists of an user.

This is what i call : https://api.spotify.com/v1/users/'id_user'/playlists

We can get all playlists but sometimes... no.
Some users (i can give you name in private), don't have all their playlists returned with this method.
Do you know why ? Scopes are good i suppose => "playlist-read-private playlist-read-collaborative playlist-modify-public playlist-modify-private"

It's an issue just for some users but why ? Even if they create a new playlist on the web version, it's not returned in this call.

Thanks a lot for helping us !

@thelinmichael
Copy link
Contributor

Hi @blackarcanis! This sounds interesting, but it'd help a lot if you could provide us with the username and the playlist URI that isn't returned. Also, I'm assuming that you're making these requests with an access token that's authorized by the user that corresponds to id_user in the URL in your issue.

@blackarcanis
Copy link
Author

Hi thanks for your reply !
Yes we use this id_user in the request, so this is an example of the playlist not returned :

username => etiennepvst
playlist => Lana Del Rey
URI => spotify:user:11895755:playlist:6QL9M0s6QYjCbtOxOk67Z7

Thanks !

@thelinmichael
Copy link
Contributor

@blackarcanis, could you double-check that username please?

@thelinmichael thelinmichael changed the title Try to get all user Playlists Missing playlists in Get a List of a User's Playlists endpoint Jul 27, 2015
@blackarcanis
Copy link
Author

@thelinmichael It's possible with a maj case "Etiennepvst" it's a linked account to Facebook.

@thelinmichael
Copy link
Contributor

@blackarcanis, thanks for clarifying. Spotify doesn't support uppercase characters in user_id's, so the username would be converted to etiennepvst, as you posted in your comment 20 days ago. There's no user with that user_id in Spotify, as shown by making a request to https://api.spotify.com/v1/users/etiennepvst, which returns a 404 Not Found response. Making a request to retrieve this user's playlists will return an empty list of playlists.

However, making a request to the Get User's Playlists endpoint for the user with user_id 11895755 will return the list of playlists including the one that you've found missing. (This request is made using an access token not authorized by user 11895755, with no extra scopes.)

API Console link to this request

This means that I can't reproduce the issue you're seeing, unless you're only seeing it when using an access token authorized by this user, with certain scopes. Would appreciate if you'd check again if you're seeing this issue using 11895755 everywhere, instead of etiennepvst.

@blackarcanis
Copy link
Author

Ah yes, i can confirm it's good with this ID !
But how can i get this kind of ID ? The only one i've got with the request https://api.spotify.com/v1/me is the username name and not an incremental ID like you have here.

Thanks !

@thelinmichael
Copy link
Contributor

@blackarcanis, interesting. Could you please paste the response from the /me endpoint?

@blackarcanis
Copy link
Author

As example, my account return :

{
  "display_name" : "Thomas Magnano",
  "external_urls" : {
    "spotify" : "https://open.spotify.com/user/blackarcanis"
  },
  "followers" : {
    "href" : null,
    "total" : 2
  },
  "href" : "https://api.spotify.com/v1/users/blackarcanis",
  "id" : "blackarcanis",
  "images" : [ {
    "height" : null,
    "url" : "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xap1/v/t1.0-1/s200x200/10277173_10204056221987836_2484803685133355525_n.jpg?oh=c38127b9dc554780437b71bebdb9f218&oe=5648E559&__gda__=1447119500_b601be8e80dab5dfd4d7cde74ea81c8e",
    "width" : null
  } ],
  "type" : "user",
  "uri" : "spotify:user:blackarcanis"
}

There is no numerical ID here.

@thelinmichael
Copy link
Contributor

Thanks a lot @blackarcanis. If a user has registered their Spotify account through Facebook they're given a numerical ID such as 11895755. When you retrieve the data from the /me endpoint for this user, the id property should be 11895755 and the uri should be spotify:user:11895755. I suppose my only question mark regarding this is where the username etiennepvst comes from.

The Web API doesn't expose Facebook user id's for users that has a connection between Facebook and Spotify.

@blackarcanis
Copy link
Author

I'm not sure to understand.
The fact is this friend can't see this playlist in the listing of his playlists.
He told me "etiennepvst" is the name of his facebook.

And you say "Web API doesn't expose Facebook user id's" so... how can i get it here ? Because there's a connection between Facebook and Spotify and his case.

For my account "blackarcanis", when i connect Spotify to Soundiiz with my Facebook account, it's always "blackarcanis" wich is returned and not an numeric ID...

@thelinmichael
Copy link
Contributor

@blackarcanis, you're not retrieving a numeric ID because you didn't register your Spotify account through Facebook. Instead, my guess is that you added the Facebook integration as an afterthought. Your friend was given a numeric ID because he never chose a Spotify username. I'm going to try to recreate this again but so far I can't see why that playlist wouldn't be returned since it's public, not collaborative, and owned by the user himself. I'd appreciate if you could paste the response you're getting from the API using this user's credentials.

@blackarcanis
Copy link
Author

Thanks @thelinmichael for your help !
I understand now for Spotify and Facebook.
I will try to get this response with this credentials for tell you.

Just for be more precise : When this user goes to the web player he can't see "Lana Del Rey" playlist but on the software app, he can see it.
And me on Soundiiz i can retrieve all his playlists web but not the playlists he can see on the desktop app.
Pretty strange...

@blackarcanis
Copy link
Author

Here is the return with credentials of the account of my friends :

{
  "display_name" : "Etienne Pvst",
  "external_urls" : {
    "spotify" : "https://open.spotify.com/user/1176389456"
  },
  "followers" : {
    "href" : null,
    "total" : 5
  },
  "href" : "https://api.spotify.com/v1/users/1176389456",
  "id" : "1176389456",
  "images" : [ {
    "height" : null,
    "url" : "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpt1/v/t1.0-1/s200x200/11206058_458770904285638_6391901812323605103_n.jpg?oh=e57259d3b4f986f29c10dcd5e9e5c382&oe=564E964F&__gda__=1451440690_0f4af45051393a95df7c3e14efc31cb7",
    "width" : null
  } ],
  "type" : "user",
  "uri" : "spotify:user:1176389456"
}

As you can see the user ID is not the same you link before

@blackarcanis
Copy link
Author

@thelinmichael , got some some news ? :/

@thelinmichael
Copy link
Contributor

Ok, this is starting to make sense now.

So what I see here is that your user, Etienne Pvst, has a Facebook generated id that's 1176389456. He is following a playlist made by another user who also has a Facebook generated, which is 11895755. When you retrieve Etienne's (1176389456) playlists, the playlist made by user 11895755, spotify:user:11895755:playlist:6QL9M0s6QYjCbtOxOk67Z7, doesn't show up.

I've checked which playlists user 1176389456 is following, and spotify:user:11895755:playlist:6QL9M0s6QYjCbtOxOk67Z7 isn't one of them. Therefore, it would make sense that this playlist doesn't show up in Soundiiz.

@blackarcanis
Copy link
Author

Well... the issue is this two accounts it's the same user, a friend of me, and for him he has only one account :/ And that's why he doesn't have the same playlists on the web version and the software version.

Do you have an issue with this migration when you introduce and old user to the web version ?

@thelinmichael
Copy link
Contributor

@blackarcanis, my assumption is still that these are two different accounts. I'd ask him to log out of the desktop application and log back in again using his Facebook account. I'd also ask him to open a private tab in his browser and try logging into the Web Player. If he uses the same Facebook account to log in but still gets different playlist content, it sounds like a bug.

@thelinmichael
Copy link
Contributor

Closing this issue now since we haven't had any reports of similar problems. Please open it if you're still experiencing this and you believe that this occurs for a single account.

@pcevikogullari
Copy link

I have the same problem. Although my permissions are set to (user-read-private","playlist-modify-public","playlist-read-collaborative","playlist-modify-private", "streaming"), I cannot get some of my playlists. I do not have numerical id as @blackarcanis .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants