Help Wizard

Step 1


Authorization Code Flow - don't want to cache tokens

Authorization Code Flow - don't want to cache tokens



I am building an app utilizing spotipy and getting a user's top tracks and artists. It is caching the tokens and making it so that my data (or the cached token user's data) is displayed regardless of who logs in. How can I fix this without deleting the cache file every time? 


This is the OAuth that I have implemented. I was initially using my username instead of a cache path, but it seems to function the same way regardless. I had hardcoded the username to be my username, as I assumed "username of client" meant the username of the account the app is registered to in the Developer Dashboard




1 Reply

Hi! I had a similar problem and found that when you call `sp_oauth.get_access_token`, you need to specify that `check_cache=False`. I attached a snap of my callback function 

Screenshot 2021-11-22 191127.jpg

Suggested posts