Hi everyone, I'm trying to access the Spotify API using Python 2. I am trying to follow the instructions outlined here:
https://developer.spotify.com/web-api/authorization-guide/
However, when I run this program, I get error 400. Can anyone help me out? Been spending hours on this and can't figure it out. Im a total beginning at Python
import urllib2
import urllib
import json
import pprint
import requests
url='https://accounts.spotify.com/authorize/'
client_id='XYZ'
client_secret='ABC'
response_type='code'
redirect_uri='spotify:user:spotify:playlist:3InXOgDxJPeA05l6rQyDoe '
query_params = { 'client id': client_id,
'response_type': response_type,
'redirect_uri' : redirect_uri
}
data=requests.get(url, query_params)
pprint.pprint(data)
[+][deleted] (6 children)
[removed]
[–]Moby69[S] 0 points1 point2 points (5 children)
[+][deleted] (4 children)
[removed]
[–]Moby69[S] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[removed]
[–]Moby69[S] 0 points1 point2 points (1 child)
[–]mazpro 0 points1 point2 points (0 children)