Hello guys, good night!
I’m developing an app to consume the Linkedin API and use the basic information of users to our new system.
But there is one step who isn’t work at time…when I call this method and debug the
token …some errror message is exibited to me
$params = [
'grant_type' => $this->grantType,
'client_id' => $this->clientID,
'client_secret' => $this->clientSecret,
'code' => $this->request->query['code'],
'redirect_uri' => $this->callbackURL,
];
$http = new Client();
$response = $http->get('https://www.linkedin.com/uas/oauth2/accessToken', $params);
$token = json_decode($response->body);
debug($token);
$user_linkedin = $this->_fetchLinkedin('/v1/people/~:(firstName,lastName,emailAddress)', $token->access_token);
ERROR MESSAGE
\src\Controller\LoginLinkedinController.php (line 76)
object(stdClass) {
error_description => 'missing required parameters, includes an invalid parameter value, parameter more than once. : Unable to retrieve access token : appId or redirect uri does not match authorization code or authorization code expired’
error => ‘invalid_request’
}