Announcements

Help Wizard

Step 1

NEXT STEP

Is it allowed to use the API to update a playlist?

Is it allowed to use the API to update a playlist?

hello, using python's spotipy, is it allowed to create a script to insert songs in several playlists of my user? and is it also allowed to extract information, such as the number of followers from playlists? I was in doubt and would not want to do anything that would go against the principles

 

 

for link in playlist_links:

playlist_id = link.split('/')[-1]
playlist = sp.playlist(playlist_id)


first_track = playlist['tracks']['items'][0]['track']['id']
sp.playlist_add_items(playlist_id, [first_track], position=0)


track_ids = [track['track']['id'] for track in playlist['tracks']['items']]
sp.playlist_remove_specific_occurrences_of_items(playlist_id, [first_track], positions=[1])

Reply
1 Reply

If you specify the functionality of your app, before the user authorizes it, I think it's allowed.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random