mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-05 07:27:47 +00:00
ascii decode in _refresh_access_token
This commit is contained in:
parent
1737a550d3
commit
a3a68be7bc
@ -218,8 +218,8 @@ class SpotifyOAuth(object):
|
|||||||
payload = { 'refresh_token': refresh_token,
|
payload = { 'refresh_token': refresh_token,
|
||||||
'grant_type': 'refresh_token'}
|
'grant_type': 'refresh_token'}
|
||||||
|
|
||||||
auth_header = base64.b64encode(self.client_id + ':' + self.client_secret)
|
auth_header = base64.b64encode(bytes(self.client_id + ':' + self.client_secret, encoding='utf-8'))
|
||||||
headers = {'Authorization': 'Basic %s' % auth_header}
|
headers = {'Authorization': 'Basic %s' % auth_header.decode('ascii')}
|
||||||
|
|
||||||
response = requests.post(self.OAUTH_TOKEN_URL, data=payload,
|
response = requests.post(self.OAUTH_TOKEN_URL, data=payload,
|
||||||
headers=headers)
|
headers=headers)
|
||||||
|
Loading…
Reference in New Issue
Block a user