"illegal scope" error when trying to get all user playlists from another user in spotifyR

23 Views Asked by At

I'm trying to obtain all the yearly Billboard Top 100 songs from the earliest possible year, for a data analysis project. I am using R with the spotifyR package.

I thought a good approach would be to find a user who has compiled many playlists with all the top 100 songs, and then use that list as a starting point to get all the songs and their spotify song id inside of them. I found a user who has a set of playlists fitting exactly what I need (e.g. "Billboard top 100 1964", "Billboard top 100 1965", etc).

The spotifyR package provides a function for this, called get_user_playlists whih requires as argument the user ID along with other arguments (limit, offset, authorization = get_authorization_code(), include_meta_info).

When I try to use that code, I get a request for an authorization code which I do not have and a chrome tab opens saying only "illegal scope". I have already set my client ID and secret, saving the token to an object. I can access albums and songs in spotify without any issue but for some reason I cannot get a list of the playlists for an individual user (and I can perfectly visualize those playlists and user in the spotify app)

How can I get that authorization code in order to get that set of playlists?

0

There are 0 best solutions below