I am working on Spotify on node, when I try to create a playlist, it keep return
{ error: { status: 400, message: 'Error parsing JSON.' } }
function create_playlist(user_id,access_token){
var options = {
url: "https://api.spotify.com/v1/users/"+user_id+"/playlists",
data: { 'Authorization': 'Bearer ' + access_token},
json : true,
headers: {
'Authorization': 'Bearer ' + access_token
},
"content-Type": 'application/json'
};
request.post(options,(error,response,body) => {
console.log(body);
})
I do have the right scope const SCOPE = 'playlist-modify-public'