Open YunyuZhang opened 6 years ago
+1 I am also encountering the same problem. Any suggestions?
Did you check your access token' scopes? Maybe there's something missing. Mine are ["playlist-read-private", "playlist-modify-private", "playlist-modify-public"]
@onhernandes it ended up being the token scope for me. Thanks!
Did this solve your problem @YunyuZhang ?
I have a similar problem with scopes. @onhernandes how did you set the scopes properly?
Anyone find a solution for this yet? Running into the same issue.
My problem was related to the scopes. I used these ones, and they worked for me: ["playlist-read-private", "playlist-modify-private", "playlist-modify-public"]
Maybe this was related to an old version of the API, but on the request you don't need a username or user ID, just a playlist and a list of song/songs to add.
@onhernandes How do you set the scopes in the code?
@onhernandes How do you set the scopes in the code?
It get's passed into the createAuthorizeUrl
method as an argument. Take a look here https://github.com/thelinmichael/spotify-web-api-node#authorization-code-flow.
Here is a list of the available scopes: https://developer.spotify.com/documentation/general/guides/scopes/#scopes
When I call
spotifyApi.addTracksToPlaylist("78q0ixigszbxoodohszxk5c99","6KU9Lo2ZyB7AbXCK7qt8rk",["spotify:track:6rPO02ozF3bM7NnOV4h6s2"])
I got
Something went wrong! { [WebapiError: Forbidden] name: 'WebapiError', message: 'Forbidden', statusCode: 403 }
"78q0ixigszbxoodohszxk5c99" is my user id and "6KU9Lo2ZyB7AbXCK7qt8rk" is my playlist id. Could someone please help me?