Token still expiring after 1 hour
Opened this issue · 1 comments
Hi, not exactly sure if this is user error or not. I open my session following the readme instructions in an incognito browser, than retrieve the sp_dc and sp_key as displayed in the attached screenshot. Then, I execute the code in the readme locally, and pass that access token to the heroku environment variables, as my spotipy application deployed on Heroku.
After an hours time, it will say that the access token has expired. I'm not sure exactly what step I am messing up on, I couldn't find the cookies using the search/filter under Network, but I found them under Application
The token will always expire after 1 hour. However the cookies (sp_dc
and sp_key
values) will be valid for 1 year. So you will need to store these two values as environment variables, and generate a new token every time inside your python code with st.start_session("sp_dc","sp_key")
.