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