"Error parsing JSON" when using Spotify API "Error parsing JSON" when using Spotify API json json

"Error parsing JSON" when using Spotify API


Solved by adding a json.dumps for the input: json.dumps(payload) and changing the payload to be 'data' and not 'params' in the request.

So the new functioning request equals:

r = requests.post(api_url, data=json.dumps(payload), headers=auth_header)