-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to refresh access token? #108
Comments
See also #7. If you're using the authorization code flow, the library should refresh the token for you automatically. If you're using the client credentials flow folks have just been recreating the client. Definitely open to ideas for making that workflow easier. |
As per this discussion Now, this is just sidenote but you rarely need spotify token to last beyond default 60 minutes.
|
Hi, sorry for taking a while to respond. I think I'm using the authorization code flow, like in the example in README.md. So that means, if I create a client with |
Yes. Your client should be authorized even if more then an hour passed. Do If you would like to store new token (to file or database) this pseudocode might help.
|
Alright, thank you very much, that does help me a lot |
as mentioned here zmb3/spotify#108 (comment)
Hi there and thanks for this great library, it saved us a lot of work :)
I do have one problem though - an access token expires after 1 hour, but can be refreshed using the refresh token:
(https://developer.spotify.com/documentation/general/guides/authorization-guide#4-requesting-a-refreshed-access-token-spotify-returns-a-new-access-token-to-your-app)
Is there a way to do this using this library?
Thanks in advance!
The text was updated successfully, but these errors were encountered: