Skip to content

Instantly share code, notes, and snippets.

@hughrawlinson
Last active February 21, 2017 19:38
Show Gist options
  • Save hughrawlinson/d9c13790679883154135eaf1b447cbed to your computer and use it in GitHub Desktop.
Save hughrawlinson/d9c13790679883154135eaf1b447cbed to your computer and use it in GitHub Desktop.
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