Spotify user albums mismatch

106 Views Asked by At

While fetching User Library albums at this endopoint:

https://api.spotify.com/v1/me/albums

See api reference here

the api call returns a small part of album list. But in Spotify App or Spotify Desktop App, it shows a different number of albums.

Does anyone know how to get artists from the library as I can't find any API documentation for it?

1

There are 1 best solutions below

0
8-Bit Borges On

As per the documentation in Spotify's User Library endpoint:

METHOD, ENDPOINT, USAGE, RETURNS

GET, /v1/me/albums, Get Current User's Saved Albums, saved albums

The above call will only return user 's saved albums.

So if you want to retrieve all albums depicted in your desktop via api calls, you must save all of them within the Desktop app, otherwise you'll have the discrepancy you describe in your question.