I'm starting to code a project based on the spotify API in Python, using the Spotipy module. This is my code
import spotipy
from spotipy.oauth2 import SpotifyOAuth
import requests as rq
SPOTIPY_CLIENT_ID="..."
SPOTIPY_CLIENT_SECRET="..."
SPOTIPY_REDIRECT_URI="http://127.0.0.1:9090"
SCOPE = "playlist-read-private%20user-read-email"
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id=SPOTIPY_CLIENT_ID, client_secret=SPOTIPY_CLIENT_SECRET, redirect_uri=SPOTIPY_REDIRECT_URI, scope=SCOPE))
user_playlists = sp.current_user_playlists()
for i in user_playlists["items"]:
print(i["name"])
So this code requires a user to grant permission to the app to see its playlists. The problem I'm having is that once I login with an account and grant permission, I can't find any way to change the user. Any clue how to do so? Thanks in advance