javascript - 403 Forbidden error when trying to add song to another collaborative playlist with Spotify Web Api -


here code using add songs button made. button works fine, able add songs own playlists. when trying add songs else's collaborative playlist, 403 forbidden error.

i have followed playlists trying add songs .i have been able add songs playlist desktop app not working on web page. don't know if error in code or if api doesn't allow collaborative playlists have songs added them. scopes project playlist-read-private,playlist-modify-private,playlist-read-collaborative user-library-modify,user-read-private user-read-email. don't think issue either.

document.getelementbyid('button1').addeventlistener('click', function() {     var myid=localstorage.getitem('spotid')     var playid=localstorage.getitem('uri')     var trackuris = document.getelementbyid("selections").value;     console.log(trackuris)     var uris=[trackuris];           //create array trackuri stored within     //adding track playlist using myid, playid, , uris fill function     spotifyapi.addtrackstoplaylist(myid,playid,uris).then(function(data) {         console.log('added', data); //logging data returend spotify console         document.getelementbyid('list').src = document.getelementbyid('list').src;         var select = document.getelementbyid("selections");         $('#selections').empty();   //deletes previos entries upon adding song playlist     }); }); 

this limitation of api. playlist owners able modify collaborative playlists through api.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -