Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Can I increase the expiry time of Spotify token?

Please advice how can I increase token expiry time While fetching data using spotify web API "https://accounts.spotify.com/api/token"

like image 756
soulgear Avatar asked May 21 '15 11:05

soulgear


People also ask

How long does Spotify access token last?

Access tokens issued from the Spotify account service has a lifetime of one hour. If a longer session is desired Spotify account service supports the OAuth Code grant flow.

How long should token expire?

By default, access tokens are valid for 60 days and programmatic refresh tokens are valid for a year. The member must reauthorize your application when refresh tokens expire.


1 Answers

Access tokens expire after one hour. This expiry time is set on Spotify's side and can't be changed by the client.

You can refresh an access token if you're retrieving it using the Authorization Code flow. (The refresh token is practically valid forever, or until it has been manually revoked.)

like image 176
Michael Thelin Avatar answered Oct 13 '22 00:10

Michael Thelin