createPlaylist 401 error
mlam28 opened this issue · comments
Ah, this was close. I just tested it locally and ran into the same problems with your code.
I was able to make it work by removing the JSON.stringify
call. My request now looks like this:
spotifyApi.createPlaylist(spotifyId, {name: "New Playlist"}).then(resp => console.log(resp));
Let me know if that doesn't work for you!
Closing this issue. The createPlaylist
function expects a JSON object as options
, so removing JSON.stringify()
should make it work. Thanks @kevinguebert for supporting.