1#! /bin/python
23
import requests
45
id = input('Enter the client id: ');
6secret = input('Enter the client secret: ');
7token = input('Enter the refresh token (obtained from get-access-token.py): ');
89
params = {'client_id':id,
10'client_secret':secret,
11'grant_type':"refresh_token",
12'refresh_token':token}
1314
r = requests.post(url = "https://accounts.spotify.com/api/token", data = params)
1516
print(r.text);