Racket - Can't retrieve Spotify access token: "unsupported grant_type" Racket - Can't retrieve Spotify access token: "unsupported grant_type" curl curl

Racket - Can't retrieve Spotify access token: "unsupported grant_type"


Update: I couldn't get the code working using Racket's HTTP library, but it worked when I switched to using the simple-http package:

(define spotify  (update-headers    (update-ssl      (update-host json-requester "accounts.spotify.com") #t)   (list    "Content-Type: application/x-www-form-urlencoded"    "Authorization: Basic ...")))(define response (json-response-body (post spotify "/api/token" #:data "grant_type=client_credentials")))(displayln (hash-ref response 'access_token))