I have a problem with this code:
scope = 'user-read-currently-playing'
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id='', client_secret='', scope=scope, redirect_uri=''))
result = sp.current_playback()
print(result)
I'm trying to get the song to listen, but I get this error:
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.spotify.com/v1/me/player
if i click to 'https://api.spotify.com/v1/me/player' the result is:
{
"error": {
"status": 401,
"message": "No token provided"
}
}
I can't understand what the mistake is.
Thanks for who will help me