How do I delete a song in my library using the Spotify API?

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 date parameter is not correct:

    data:{'Id':'1ftBvRj542ol7LT1A0EtL7'},

Because of the following error:

    
asked by anonymous 03.10.2018 / 16:34

0 answers