title: Spotify request token returns invalid_client
body: <p>I hope someone can help me here:</p>
  
  <p>I have an application which should use the Spotify API. But after request the authorization itself, I am stuck at requesting a token. Related code follows:  </p>
  
  <pre><code>function post($content, $url,$clientId,$clientSecret)
  {
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch, CURLOPT_POSTFIELDS, $content);
  curl_setopt($ch, CURLOPT_HTTPHEADER,
      array(
          'Content-Type: application/x-www-form-urlencoded',
          'Authorization: Basic '.base64_encode($clientId).':'.base64_encode($clientSecret)));
  return curl_exec($ch);
  }
  $clientId="4df42e27a76d41f9961b0952102fexxx";
  $clientSecret="3088a8b6132b40dc980540880cf5bxxx";
  $content=array(
  'grant_type' =&gt; 'authorization_code',
  'code' =&gt; $_GET["code"],
  'redirect_uri' =&gt; 'http%3A%2F%2Fhome.xxx.de%2Ftoken.php',
  );
  echo post($content,"https://accounts.spotify.com/api/token",$clientId,$clientSecret);
  </code></pre>
  
  <p>Unfortunatly, the result is {"error":"invalid_client"} and i have no idea why...</p>