title: Deezer API access token
body: <p>I've tried to get my access token for the deezer API but i keep getting the 'wrong code' message when i send my request.
  Here is the said request : </p>
  
  <pre><code>'https://connect.deezer.com/oauth/access_token.php?app_id=' + appID + '&amp;secret=' + clientSecret + '&amp;code=' + code;
  </code></pre>
  
  <p>The app ID and the client secret are located on developers.deezer.com/myapps so i can't be wrong with these two.</p>
  
  <p>For the code i'm using a php code sample given by deezer themself (you can look it up here : <a href="https://developers.deezer.com/api/oauth" rel="nofollow noreferrer">https://developers.deezer.com/api/oauth</a>)
  The said sample code is a simple page that makes you agree to let your application your data, as usual. 
  At the end you're redirected to an empty page with an url like this one (don't worry, the code and scope are fake) :</p>
  
  <pre><code>http://localhost/deezerAPI/test1.php?code=fr14364f27b39760284c5698&amp;state=27f24b97ab810mb3176d42fh
  </code></pre>
  
  <p>Anyway, I've copy and pasted the (fake) code <strong>fr14364f27b39760284c5698</strong> to a self made node js program (why nodejs? because i'm much more comfortable using node to send requests) (also, the values here are fake too) :</p>
  
  <pre><code>'use strict';
  
  const express = require('express');
  var request = require('request');
  
  const app = new express();
  
  var appID = '&lt;appId&gt;'
  var clientSecret = '&lt;clientSecret&gt;';
  var code = 'fr14364f27b39760284c5698'
  
  var requestURI = 'https://connect.deezer.com/oauth/access_token.php?app_id=' + appID + '&amp;secret=' + clientSecret + '&amp;code=' + code;
  
  request(requestURI, (error, response, body) =&gt; {
    console.log("Recieved body'" + body + "'");
  });
  
  app.listen(8081, () =&gt; {
      console.log("WebClient is up!");
  });
  </code></pre>
  
  <p>And every time i recieve the body 'wrong code'.
  To me it can only mean two things :</p>
  
  <ul>
  <li><p>the php code sample deezer gave me is wrong or i wrote something wrong in it (like the app ID or client secret) but that's unlikely since i've checked what i wrote several time.</p></li>
  <li><p>the node js code i made is wrong (in the way i make my request for exemple) or, like before, the info i've put is wrong (but i've also checked several times...).
  I'm out of solutions so if you guys have any clue, tell me. Thanks in advance.</p></li>
  </ul>
  
  <p>PS: if you want to see the deezer code sample tell me, what i have on my wamp server isn't different from what they have but maybe you'll see something that doesn't add up.</p>