Guzzle oauth2 authentification issue

Viewed 477

I am trying to connect to an oauth2 system using guzzle but I keep getting this message:


$guzzle = new GuzzleHttp\Client;

$response = $guzzle->post('https://logincert.anaf.ro/anaf-oauth2/v1/authorize', [
    'form_params' => [
        'grant_type'    => 'authorization_code',
        'response_type' => 'token',
        'client_id'     => 'xxxx',
        'client_secret' => 'xxxxx',
        'redirect_uri'  => 'http://redirect'
    ],
]);

return json_decode((string) $response->getBody(), true)['access_token'];
{
  "error":"invalid_client",
  "error_description":"The client app does not support implicit grant"
}

The provider doesn't provide much information about the returned message, the only information that they provide are:

Any ideas what am I doing wrong?

Thanks, Chris

0 Answers
Related