mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-05 07:27:47 +00:00
Update oauth2.py
refresh access token is now available also for developers, not only for the library
This commit is contained in:
parent
0b9a0276c1
commit
891731c78e
@ -134,7 +134,7 @@ class SpotifyOAuth(object):
|
||||
return None
|
||||
|
||||
if self._is_token_expired(token_info):
|
||||
token_info = self._refresh_access_token(token_info['refresh_token'])
|
||||
token_info = self.refresh_access_token(token_info['refresh_token'])
|
||||
|
||||
except IOError:
|
||||
pass
|
||||
@ -221,7 +221,7 @@ class SpotifyOAuth(object):
|
||||
else:
|
||||
return None
|
||||
|
||||
def _refresh_access_token(self, refresh_token):
|
||||
def refresh_access_token(self, refresh_token):
|
||||
payload = { 'refresh_token': refresh_token,
|
||||
'grant_type': 'refresh_token'}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user