using variables in wrapper requests
See original GitHub issueHey
JMPerez kindly forwarded me here … thanks! Having issues concanting an array into the wrapped request for add to playlist
spotifyApi.addTracksToPlaylist('iluvdrumandbass', '1UG26LaMkbdgFvsi430fW1', JSON.stringify(finalUri))
gives me {name: “WebapiError”, message: “Bad Request”, statusCode: 400}
(Authentication is working fine)
I have tried both
spotifyApi.addTracksToPlaylist('iluvdrumandbass', '1UG26LaMkbdgFvsi430fW1', JSON.stringify(finalUri))
and
spotifyApi.addTracksToPlaylist('iluvdrumandbass', '1UG26LaMkbdgFvsi430fW1', finalUri)
where finalUri is
["spotify:track:0D5zFzZDG2vFzmizPBoq9I","spotify:track:1wY2yIk3UtwLFZPcQgyejq","spotify:track:3KjskT7nZJT3bNF2eLelnh"]
or technically finalUri='["spotify:track:0D5zFzZDG2vFzmizPBoq9I","spotify:track:1wY2yIk3UtwLFZPcQgyejq","spotify:track:3KjskT7nZJT3bNF2eLelnh"]'
This is definetely not my favourite part of JS!
Haven’t been able to find anything in the notes here to explain how to use variables as part of a request
Thanks
Dan
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top GitHub Comments
Fixed this… was a dumb mistake i was grabbing token with wrong scopes saved in an old node file! eeek sorry. Thanks onhernandes!
Great! You’re welcome 😄