You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I can't seem to figure out why oauth page pops up every time I call spotify - trying to use PKCE method to prevent client_secret leak. Here's an example code that I'm running
importspotipysecret=spotipy.oauth2.SpotifyPKCE("<clientid>", "http://127.0.0.1:8000/spotify/callback/", cache_handler=spotipy.CacheFileHandler(".cache_sp"))
spotify=spotipy.Spotify(auth_manager=secret)
# Build resultquery="This is a test"result=spotify.search(q=query,type="track")
resultTrack=spotify.track(track_id=result["tracks"]["items"][0]["id"])
resultAlbum=spotify.album(album_id=resultTrack["album"]["id"])
resultFeatures=spotify.audio_features(resultTrack["id"])[0]
# Printout - not actually there in my implementationprint(str(result))
print(str(resultTrack))
print(str(resultAlbum))
print(str(resultFeatures))
This code asks for authentication 4 times - I can see that the token is being cached, but why is the script not using cache and re-authenticating every time? I'm new to Spotipy, Spotify API and anything API really, by the way.
The text was updated successfully, but these errors were encountered:
It looks like there is a bug in which the token info is rejected as invalid if it is not authorized for any scopes. As a workaround, for these endpoints, you can use the SpotifyClientCredentials authorization manager, or authorize for at least one scope.
It looks like there is a bug in which the token info is rejected as invalid if it is not authorized for any scopes. As a workaround, for these endpoints, you can use the SpotifyClientCredentials authorization manager, or authorize for at least one scope.
Are there plans for this to be fixed? Is it an issue on Spotify's end?
Hello! I can't seem to figure out why oauth page pops up every time I call
spotify
- trying to use PKCE method to preventclient_secret
leak. Here's an example code that I'm runningThis code asks for authentication 4 times - I can see that the token is being cached, but why is the script not using cache and re-authenticating every time? I'm new to Spotipy, Spotify API and anything API really, by the way.
The text was updated successfully, but these errors were encountered: