I'm trying to communicate with Spotify using web API.
So here's the case. In order to retrieve any information from Spotify, first I need to be authorized by Spotify. To do so, I need to send a post request to https://accounts.spotify.com/api/token
containing authorization credentials(containing client_id and client_secret), and then in response, I should receive an access token which later I shall use to retrieve any other information.
Here's a quick Spotify documentation on how it works :
So the problem here is that I'm doing everything I should but I don't get the token in response.
Here's my code using the Guzzle package in laravel :
And instead of an access token as a response, This HTML output is what I'm receiving from Spotify in return (Without any further information of the problem and any error code):