Last active
February 21, 2017 19:38
-
-
Save hughrawlinson/d9c13790679883154135eaf1b447cbed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request = requests.post( | |
"https://accounts.spotify.com/api/token", | |
data = json.dumps({ | |
"grant_type": "client_credentials" | |
}), | |
headers = { | |
"Authorization": "Basic " + str( | |
base64.b64encode( | |
(config.config["spotify"]["client_id"] + | |
":" + config.config["spotify"]["client_secret"] | |
).encode('ascii') | |
).decode('ascii') | |
) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment