sp = spotipy.Spotify(
auth_manager=SpotifyOAuth(
scope="playlist-modify-private",
redirect_uri="http://example.com",
client_id=CLIENT_ID,
client_secret=CLIENT_SECRET,
show_dialog=True,
cache_path="token.txt"
)
)
# ------------------------------ Creates a Playlist ------------------------#
playlist = sp.user_playlist_create(USER_NAME, "My Favorite Songs", public=True, description="The list of my favorite songs")
# ------------------------------ Gets the Playlist ID ----------------------#
sp.playlist_add_items(playlist_id=playlist["id"], items=uris)