0
I have the following code:
$.ajax({
//url: 'https://api.spotify.com/v1/me/tracks?ids=1ftBvRj542ol7LT1A0EtL7',
url: 'https://api.spotify.com/v1/me/tracks',
method:"delete",
scope: "user-library-modify",
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-Type':'application/json'
},
data:{'Id':'1ftBvRj542ol7LT1A0EtL7'},
json: true,
success: function(response) {
Console.log(response);
/*for(var k in response.items){
i += 1;
item.push('<li class="ui-state-default" id="m_'+response.items[k].track.id+'">'+response.items[k].track.name + '</li>');
}
item.push('</ul>');
//$('#teste')
//userProfilePlaceholder.innerHTML = userProfileTemplate(response);
userProfilePlaceholder.innerHTML = item.join("");
//console.log(userProfilePlaceholder);
*/
}
});
But the parameter date is not correct:
data:{'Id':'1ftBvRj542ol7LT1A0EtL7'},
For make the following mistake:
Try to change
json: true
fordataType: 'json'
. Try to change tooId
forid
.– Luiz Felipe
made the same mistake :(
– Tiago Pereira