I’ve been experiencing the same error for two weeks and I don’t know what to do. The idea of this workflow is that people can request a summary from my website, whether daily, weekly, or yearly.
I’m having trouble with the “Exchange Code for Token” node. I’m getting the following error:
Error:
Bad request - please check your parameters
400 Bad Request Error: Bad Request Your client has issued a malformed or illegal request.
Full message
400 - "\n<html><head>\n<meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<title>400 Bad Request</title>\n</head>\n<body text=#000000 bgcolor=#ffffff>\n<h1>Error: Bad Request</h1>\n<h2>Your client has issued a malformed or illegal request.</h2>\n<h2></h2>\n</body></html>\n"
Request
{ "headers": { "content-type": "application/x-www-form-urlencoded", "accept": "application/json" }, "method": "GET", "uri": "https://accounts.spotify.com/api/token", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "followAllRedirects": true, "timeout": 15000, "form": { "grant_type": "authorization_code", "redirect_uri": "https://n8n.rbv-utility.es/webhook/oauth/spotify/callback" }, "json": true, "auth": { "user": "c54d0fa62f254d86b2735844b1690a50", "pass": "**hidden**" } }
If necessary, I’ll attach the HTML and JS code to see if the error is coming from there, but in principle, it isn’t. Any help is appreciated <3